Unify Celery settings with gvafile

This commit is contained in:
Jan Dittberner 2020-03-04 18:44:13 +01:00
parent b72f5847da
commit 131bf02a08
2 changed files with 2 additions and 2 deletions

View file

@ -9,5 +9,5 @@ from celery import Celery
#: The Celery application
app = Celery("pgsqltasks")
app.config_from_object("pgsqltasks.settings")
app.config_from_object("pgsqltasks.settings", namespace="CELERY")
app.autodiscover_tasks(["pgsqltasks.tasks"], force=True)

View file

@ -27,11 +27,11 @@ def get_env_setting(setting):
########## CELERY CONFIGURATION
CELERY_BROKER_URL = get_env_setting("GVAPGSQL_BROKER_URL")
CELERY_RESULT_BACKEND = get_env_setting("GVAPGSQL_RESULTS_REDIS_URL")
CELERY_RESULT_PERSISTENT = True
CELERY_TASK_RESULT_EXPIRES = None
CELERY_ROUTES = ("gvacommon.celeryrouters.GvaRouter",)
CELERY_TIMEZONE = "Europe/Berlin"
CELERY_ENABLE_UTC = True
CELERY_RESULT_PERSISTENT = True
CELERY_ACCEPT_CONTENT = ["json"]
CELERY_TASK_SERIALIZER = "json"
CELERY_RESULT_SERIALIZER = "json"