diff --git a/app/repcofkk/production_settings.py b/app/repcofkk/production_settings.py index f15bbb9..0c8380b 100644 --- a/app/repcofkk/production_settings.py +++ b/app/repcofkk/production_settings.py @@ -32,3 +32,14 @@ DATABASES = { "CONN_MAX_AGE": None, }, } + +REDIS_HOST = os.getenv("REDIS_HOST") +REDIS_PORT = os.getenv("REDIS_PORT") + +CELERY_BROKER_URL = "redis://" + REDIS_HOST + ":" + REDIS_PORT + "/0" +CELERY_BROKER_TRANSPORT_OPTIONS = {"visibility_timeout": 3600} +CELERY_RESULT_BACKEND = "redis://" + REDIS_HOST + ":" + REDIS_PORT + "/0" + +CELERY_ACCEPT_CONTENT = ["application/json"] +CELERY_TASK_SERIALIZER = "json" +CELERY_RESULT_SERIALIZER = "json" diff --git a/app/repcofkk/settings.py b/app/repcofkk/settings.py index 1c2f6cf..54227c9 100644 --- a/app/repcofkk/settings.py +++ b/app/repcofkk/settings.py @@ -95,17 +95,6 @@ LOGIN_REDIRECT_URL = "/" logging.set() -REDIS_HOST = os.getenv("REDIS_HOST") -REDIS_PORT = os.getenv("REDIS_PORT") - -CELERY_BROKER_URL = "redis://" + REDIS_HOST + ":" + REDIS_PORT + "/0" -CELERY_BROKER_TRANSPORT_OPTIONS = {"visibility_timeout": 3600} -CELERY_RESULT_BACKEND = "redis://" + REDIS_HOST + ":" + REDIS_PORT + "/0" - -CELERY_ACCEPT_CONTENT = ["application/json"] -CELERY_TASK_SERIALIZER = "json" -CELERY_RESULT_SERIALIZER = "json" - APP_VERSION = "0.1.1" from .app_settings import *