如何为芹菜任务选择结果队列?
How to choose result queue for celery task?
这是我的芹菜配置:
BROKER_TRANSPORT='amqp',
CELERY_RESULT_BACKEND='rpc://',
我正在发送任务以这种方式执行:
result = my_function.apply_async(('arguments here',), queue='queue_123')
Celery 按预期工作,我在 "queue_123" 中看到了这个任务。
现在我需要将所有执行结果放入队列 "my_result_queue"。我该怎么做?
Celery 现在创建名称为“19b7013a-a077-3d2a-b60a-d57c51d5d30c”的新队列并向其中插入结果。我需要修复此行为并将结果插入到具有指定名称的队列中。
我需要这样的东西:
result = my_function.apply_async(('arguments here',), queue='queue_123', results_queue='my_result_queue')
@app.task(reply_to='result_queue)
这是我的芹菜配置:
BROKER_TRANSPORT='amqp',
CELERY_RESULT_BACKEND='rpc://',
我正在发送任务以这种方式执行:
result = my_function.apply_async(('arguments here',), queue='queue_123')
Celery 按预期工作,我在 "queue_123" 中看到了这个任务。
现在我需要将所有执行结果放入队列 "my_result_queue"。我该怎么做?
Celery 现在创建名称为“19b7013a-a077-3d2a-b60a-d57c51d5d30c”的新队列并向其中插入结果。我需要修复此行为并将结果插入到具有指定名称的队列中。
我需要这样的东西:
result = my_function.apply_async(('arguments here',), queue='queue_123', results_queue='my_result_queue')
@app.task(reply_to='result_queue)