OnlineJudge/judge/judger_controller/celery.py

9 lines
343 B
Python
Raw Normal View History

# coding=utf-8
from __future__ import absolute_import
from celery import Celery
from .settings import redis_config
2015-08-15 15:46:25 +00:00
app = Celery("judge", broker='redis://%s:%s/%s' % (redis_config["host"], redis_config["port"], redis_config["db"]),
2015-08-15 06:50:22 +00:00
include=["judge.judger_controller.tasks"])
2015-08-15 15:46:25 +00:00
Celery().conf.update(CELERY_ACCEPT_CONTENT = ['json'])