From 1d42a34fdbff7cbadc1a6ddf2eeb27dffc118e3b Mon Sep 17 00:00:00 2001 From: zakhy Date: Mon, 5 Aug 2024 14:11:12 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D1=84=D0=BE=D1=80?= =?UTF-8?q?=D0=BC=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BB=20=D0=BD=D0=B0=D1=81?= =?UTF-8?q?=D1=82=D1=80=D0=BE=D0=B9=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/repcofkk/production_settings.py | 11 +++++++++++ app/repcofkk/settings.py | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) 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 *