| 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__ import absolute_import# 说明: 导入公共模块from kombu import Queue, 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' }} |
新闻热点
疑难解答