| 1234567891011121314151617181920212223242526272829303132333435 | #!/usr/bin/env python# -*- coding: utf-8 -*-# @Date    : 2016-12-24 17:32:54# @Author  : 李滿滿 (xmdevops@vip.QQ.com)# @Link    : http://xmdevops.blog.51cto.com/# @Version : $Id$from__future__ importabsolute_import# 說明: 導入公共模塊fromkombu importQueue, Exchange# 說明: 導入其它模塊# BROKER_URL = 'amqp://root:qwertyuiop@172.24.10.1:5672//'# CELERY_RESULT_BACKEND = 'redis://172.24.10.1:6379/0'BROKER_URL ='amqp://root:qwertyuiop@10.2.5.51:5672//'CELERY_RESULT_BACKEND ='redis://10.2.5.51:5123/0'CELERY_TASK_SERIALIZER ='msgpack'CELERY_RESULT_SERIALIZER ='json'CELERY_TASK_RESULT_EXPIRES =60*60*24CELERY_ACCEPT_CONTENT =['json', 'msgpack']CELERYD_MAX_TASKS_PER_CHILD =40CELERY_QUEUES =(    Queue(        name='email_queue',        exchange=Exchange('email_exchange', 'direct'),        routing_key='email'),    Queue(        name='wixin_queue',        exchange=Exchange('wixin_exchange', 'direct'),        routing_key='wixin'),)CELERY_ROUTES ={    'work.notify.email.send_mail': {        'queue': 'email_queue',        'routing_key': 'email'    }} | 
新聞熱點
疑難解答