__init__.py 433 B

12345678910111213141516
  1. # coding:utf-8
  2. from __future__ import absolute_import
  3. import pymysql
  4. pymysql.install_as_MySQLdb()
  5. #绝对导入,以免celery和标准库中的celery模块冲突
  6. # This will make sure the app is always imported when
  7. # Django starts so that shared_task will use this app.
  8. #以下导入时为了确保在Django启动时加载app,shared_task在app中会使用到
  9. from .celery import app as celery_app
  10. __all__ = ['celery_app']