-
Notifications
You must be signed in to change notification settings - Fork 1
/
celeryconfig.py
28 lines (23 loc) · 1 KB
/
celeryconfig.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# -*- coding: utf-8 -*-
"""
Configuration values for worker processes.
"""
# Broker settings ------------------------------------------------------------
BROKER_URL = 'amqp://amqp'
CELERY_RESULT_BACKEND = 'rpc://'
CELERY_RESULT_PERSISTENT = False
CELERY_TASK_RESULT_EXPIRES = 7200 # 2 hours.
# Result backend settings ----------------------------------------------------
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'
CELERY_ACCEPT_CONTENT = ['json']
# Worker settings ------------------------------------------------------------
CELERY_SEND_EVENTS = True
CELERYD_CONCURRENCY = 2
CELERYD_PREFETCH_MULTIPLIER = 1
# Logging settings -----------------------------------------------------------
CELERYD_TASK_LOG_FORMAT = ("[%(asctime)s: %(levelname)s/%(processName)s] "
"[%(task_name)s(%(task_id)s)] - %(name)s - "
"%(message)s")
CELERYD_LOG_FORMAT = ("[%(asctime)s: %(levelname)s/%(processName)s] "
"- %(name)s - %(message)s")