#-*- coding:utf-8 -*-
from __future__ import absolute_import
import os
from celery import Celery, platforms

# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'datacenter.settings') # 修改成celery_pro项目名

from django.conf import settings  # noqa


#app = Celery('datacenter', backend='amqp', broker='amqp://guest@localhost//')
app = Celery('datacenter', broker='amqp://tj_rabbit:QWER@localhost//', backend='amqp://tj_rabbit:QWER@localhost//')
#app = Celery('datacenter', backend='redis://:tjredis139@localhost:16379/9',broker='redis://:tjredis139@localhost:16379/9')

platforms.C_FORCE_ROOT = True

# Using a string here means the worker will not have to
# pickle the object when using Windows.
app.config_from_object('django.conf:settings')
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)





