Skip to content

Commit fd83d06

Browse files
authored
Merge pull request #58 from jianxiaoguo/main
chore(controller): upgrade celery config
2 parents b57de3d + cd6c5d5 commit fd83d06

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

rootfs/api/settings/production.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -470,22 +470,22 @@
470470
}
471471

472472
# Celery Configuration Options
473-
CELERY_TIMEZONE = "Asia/Shanghai"
474-
CELERY_ENABLE_UTC = True
475-
CELERY_TASK_SERIALIZER = 'pickle'
476-
CELERY_ACCEPT_CONTENT = frozenset([
473+
timezone = "Asia/Shanghai"
474+
enable_utc = True
475+
task_serializer = 'pickle'
476+
accept_content = frozenset([
477477
'application/data',
478478
'application/text',
479479
'application/json',
480480
'application/x-python-serialize',
481481
])
482-
CELERY_TASK_TRACK_STARTED = True
483-
CELERY_TASK_TIME_LIMIT = 30 * 60
484-
CELERYD_MAX_TASKS_PER_CHILD = 200
485-
CELERY_TASK_RESULT_EXPIRES = 24 * 60 * 60
486-
CELERY_BROKER_URL = os.environ.get('DRYCC_RABBITMQ_URL', 'amqp://guest:guest@127.0.0.1:5672/') # noqa
487-
CELERY_CACHE_BACKEND = 'django-cache'
488-
CELERY_DEFAULT_QUEUE = 'priority.middle'
482+
task_track_started = True
483+
task_time_limit = 30 * 60
484+
worker_max_tasks_per_child = 200
485+
result_expires = 24 * 60 * 60
486+
broker_url = os.environ.get('DRYCC_RABBITMQ_URL', 'amqp://guest:guest@127.0.0.1:5672/') # noqa
487+
cache_backend = 'django-cache'
488+
task_default_queue = 'priority.middle'
489489

490490
# Influxdb Configuration Options
491491
DRYCC_INFLUXDB_URL = os.environ.get('DRYCC_INFLUXDB_URL', 'http://localhost:8086')

0 commit comments

Comments
 (0)