Unify celery config with gvaldap and gvaweb

This commit is contained in:
Jan Dittberner 2020-03-04 18:42:37 +01:00
parent aa2b87682f
commit c4e7e8c497
2 changed files with 4 additions and 4 deletions

View File

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

View File

@ -25,16 +25,16 @@ def get_env_variable(setting):
########## CELERY CONFIGURATION
CELERY_TIMEZONE = "Europe/Berlin"
CELERY_ENABLE_UTC = True
CELERY_BROKER_URL = get_env_variable("GVAFILE_BROKER_URL")
CELERY_RESULT_BACKEND = get_env_variable("GVAFILE_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_ACCEPT_CONTENT = ["json"]
CELERY_TASK_SERIALIZER = "json"
CELERY_RESULT_SERIALIZER = "json"
BROKER_URL = get_env_variable("GVAFILE_BROKER_URL")
########## END CELERY CONFIGURATION
########## GVAFILE CONFIGURATION