Refactor Celery settings to use dynamic Redis host configuration
This commit is contained in:
@@ -89,8 +89,9 @@ CIMAR_PASSWORD = "<REPLACE-WITH-SECRET>"
|
||||
|
||||
# Celery settings — when running in docker the redis service is
|
||||
# reachable at the `redis` hostname provided by docker compose.
|
||||
CELERY_BROKER_URL = "redis://redis:6379"
|
||||
CELERY_RESULT_BACKEND = "redis://redis:6379"
|
||||
REDIS_HOST = os.environ.get("REDIS_HOST", "redis")
|
||||
CELERY_BROKER_URL = f"redis://{REDIS_HOST}:6379"
|
||||
CELERY_RESULT_BACKEND = f"redis://{REDIS_HOST}:6379"
|
||||
|
||||
DATABASES = {
|
||||
"default": {
|
||||
|
||||
@@ -56,5 +56,6 @@ CIMAR_PASSWORD = "<REPLACE-WITH-SECRET>"
|
||||
|
||||
# Celery settings — when running in docker the redis service is
|
||||
# reachable at the `redis` hostname provided by docker compose.
|
||||
CELERY_BROKER_URL = "redis://redis:6379"
|
||||
CELERY_RESULT_BACKEND = "redis://redis:6379"
|
||||
REDIS_HOST = os.environ.get("REDIS_HOST", "redis")
|
||||
CELERY_BROKER_URL = f"redis://{REDIS_HOST}:6379"
|
||||
CELERY_RESULT_BACKEND = f"redis://{REDIS_HOST}:6379"
|
||||
|
||||
Reference in New Issue
Block a user