我已经用 RabbitMQ 安装了 Celery。
问题是,对于返回的每个结果,Celery 都会在 Rabbit 中创建队列,并在交换 celeryresults 中使用任务 ID。
我仍然想得到结果,但在一个队列上。
我的芹菜配置:
from datetime import timedelta
OKER_URL = 'amqp://'
CELERY_RESULT_BACKEND = 'amqp'
#CELERY_IGNORE_RESULT = True
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'
CELERY_ACCEPT_CONTENT=['json', 'application/json']
CELERY_TIMEZONE = 'Europe/Oslo'
CELERY_ENABLE_UTC = True
from celery.schedules import crontab
CELERYBEAT_SCHEDULE = {
'every-minute': {
'task': 'tasks.remote',
'schedule': timedelta(seconds=30),
'args': (),
},
}
那可能吗?如何?
Thanks!
amqp后端为每个任务创建一个新队列。或者,有一个新的rpc后端将结果保存在单个队列中。
http://docs.celeryproject.org/en/master/whatsnew-3.1.html#new-rpc-result-backend http://docs.celeryproject.org/en/master/whatsnew-3.1.html#new-rpc-result-backend
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)