From cd6c5d5cae304a49dd599deab8a6ffa859720c40 Mon Sep 17 00:00:00 2001 From: lijianguo Date: Fri, 3 Sep 2021 17:37:11 +0800 Subject: [PATCH] chore(controller): upgrade celery config --- rootfs/api/settings/production.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/rootfs/api/settings/production.py b/rootfs/api/settings/production.py index 52e3f57b..6f40f77d 100644 --- a/rootfs/api/settings/production.py +++ b/rootfs/api/settings/production.py @@ -470,22 +470,22 @@ } # Celery Configuration Options -CELERY_TIMEZONE = "Asia/Shanghai" -CELERY_ENABLE_UTC = True -CELERY_TASK_SERIALIZER = 'pickle' -CELERY_ACCEPT_CONTENT = frozenset([ +timezone = "Asia/Shanghai" +enable_utc = True +task_serializer = 'pickle' +accept_content = frozenset([ 'application/data', 'application/text', 'application/json', 'application/x-python-serialize', ]) -CELERY_TASK_TRACK_STARTED = True -CELERY_TASK_TIME_LIMIT = 30 * 60 -CELERYD_MAX_TASKS_PER_CHILD = 200 -CELERY_TASK_RESULT_EXPIRES = 24 * 60 * 60 -CELERY_BROKER_URL = os.environ.get('DRYCC_RABBITMQ_URL', 'amqp://guest:guest@127.0.0.1:5672/') # noqa -CELERY_CACHE_BACKEND = 'django-cache' -CELERY_DEFAULT_QUEUE = 'priority.middle' +task_track_started = True +task_time_limit = 30 * 60 +worker_max_tasks_per_child = 200 +result_expires = 24 * 60 * 60 +broker_url = os.environ.get('DRYCC_RABBITMQ_URL', 'amqp://guest:guest@127.0.0.1:5672/') # noqa +cache_backend = 'django-cache' +task_default_queue = 'priority.middle' # Influxdb Configuration Options DRYCC_INFLUXDB_URL = os.environ.get('DRYCC_INFLUXDB_URL', 'http://localhost:8086')