From 131bf02a086b58d8de900251ecbd91b9d76a9c64 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Wed, 4 Mar 2020 18:44:13 +0100 Subject: [PATCH] Unify Celery settings with gvafile --- gvapgsql/pgsqltasks/celery.py | 2 +- gvapgsql/pgsqltasks/settings.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gvapgsql/pgsqltasks/celery.py b/gvapgsql/pgsqltasks/celery.py index 5873c89..630bbe3 100644 --- a/gvapgsql/pgsqltasks/celery.py +++ b/gvapgsql/pgsqltasks/celery.py @@ -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) diff --git a/gvapgsql/pgsqltasks/settings.py b/gvapgsql/pgsqltasks/settings.py index 1bafb26..f8b1f38 100644 --- a/gvapgsql/pgsqltasks/settings.py +++ b/gvapgsql/pgsqltasks/settings.py @@ -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"