old_contents: # coding=utf-8
  from __future__ import absolute_import
  from celery import Celery
  from .settings import redis_config
  
  app = Celery("judge", broker="redis://" +
                               redis_config["host"] + ":" +
                               str(redis_config["port"]) +
                               "/" + str(redis_config["db"]),
               include=["judge.judger_controller.tasks"])
  
new_contents: # 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'])
subject: 修改 celery 配置文件格式