# celery启动文件(准备celery客户端)

from celery import Celery
import os
# 配置celery，如果需要用配置文件时去哪里加载
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "meiduo_mall.settings.dev")

# 1.创建celery客户端
celery_app = Celery('meiduo')
# 2.加载配置信息
celery_app.config_from_object('celery_tasks.config')


# 3.注册异步任务(哪些任务可以进入到任务队列)
celery_app.autodiscover_tasks(['celery_tasks.sms', 'celery_tasks.email', 'celery_tasks.html'])

f04467b48df989f56df6457f95654c9ee28a1130
<mask token>

<mask token>
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'meiduo_mall.settings.dev')
<mask token>
celery_app.config_from_object('celery_tasks.config')
celery_app.autodiscover_tasks(['celery_tasks.sms', 'celery_tasks.email',
    'celery_tasks.html'])

<mask token>
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'meiduo_mall.settings.dev')
celery_app = Celery('meiduo')
celery_app.config_from_object('celery_tasks.config')
celery_app.autodiscover_tasks(['celery_tasks.sms', 'celery_tasks.email',
    'celery_tasks.html'])

from celery import Celery
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'meiduo_mall.settings.dev')
celery_app = Celery('meiduo')
celery_app.config_from_object('celery_tasks.config')
celery_app.autodiscover_tasks(['celery_tasks.sms', 'celery_tasks.email',
    'celery_tasks.html'])

# celery启动文件(准备celery客户端)

from celery import Celery
import os
# 配置celery，如果需要用配置文件时去哪里加载
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "meiduo_mall.settings.dev")

# 1.创建celery客户端
celery_app = Celery('meiduo')
# 2.加载配置信息
celery_app.config_from_object('celery_tasks.config')


# 3.注册异步任务(哪些任务可以进入到任务队列)
celery_app.autodiscover_tasks(['celery_tasks.sms', 'celery_tasks.email', 'celery_tasks.html'])
