修改 celery 配置文件格式
This commit is contained in:
@@ -3,8 +3,7 @@ from __future__ import absolute_import
|
|||||||
from celery import Celery
|
from celery import Celery
|
||||||
from .settings import redis_config
|
from .settings import redis_config
|
||||||
|
|
||||||
app = Celery("judge", broker="redis://" +
|
app = Celery("judge", broker='redis://%s:%s/%s' % (redis_config["host"], redis_config["port"], redis_config["db"]),
|
||||||
redis_config["host"] + ":" +
|
|
||||||
str(redis_config["port"]) +
|
|
||||||
"/" + str(redis_config["db"]),
|
|
||||||
include=["judge.judger_controller.tasks"])
|
include=["judge.judger_controller.tasks"])
|
||||||
|
|
||||||
|
Celery().conf.update(CELERY_ACCEPT_CONTENT = ['json'])
|
||||||
Reference in New Issue
Block a user