OnlineJudge/judge/judger_controller/celery.py
2015-08-15 23:46:25 +08:00

9 lines
343 B
Python

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