1234567891011121314151617181920212223242526272829 | #!/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 datetime import timedelta from kombu import Queue, Exchange from celery.schedules import crontab # 说明: 导入其它模块 # 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 * 24 CELERY_ACCEPT_CONTENT = [ 'json' , 'msgpack' ] CELERYD_MAX_TASKS_PER_CHILD = 40 CELERYBEAT_SCHEDULE = { 'send_mail' : { 'task' : 'work.notify.email.send_mail' , # 'schedule': timedelta(minute=1), 'schedule' : crontab(minute = '*/1' ), 'args' : ( 'usr' , 'sub' , 'msg' ) } } |
新闻热点
疑难解答