RabbitMQ上芹菜任务优先级的解决方法? [英] Workaround for celery task priority on RabbitMQ?

查看:109
本文介绍了RabbitMQ上芹菜任务优先级的解决方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在RabbitMQ之上将Django与Celery一起运行,作为队列来处理一些数据处理任务。用户首次注册时,我将启动芹菜任务,并定期更新其数据。但是,我当然想优先考虑运行当前在线用户的任务。我注意到对celery中的任务有一个优先级设置,但似乎Rabbitmq不支持此设置。此线程 http:// groups。 google.com/group/celery-users/browse_thread/thread/ac3b6123d63421e5/b7740def1389e87e?lnk=gst&q=priority#b7740def1389e87e 建议有两个不同的队列,一个高优先级,一个低优先级,或为优先级较低的任务设置速率限制。



有人能实施优先级吗?

解决方案

据我所知,但尚未完成,请在此处进行介绍:



http://docs.celeryproject.org/en/master/faq.html#does-celery-support-task-priorities [稳定]
http://docs.celeryproject.org/en/latest/faq.html#does-celery -support-task-priorities [最新]


I am running Django with Celery on top of RabbitMQ as a queue to handle some data processing tasks. I am kicking off celery tasks when a user first signs up, as well as periodically to update their data. However, I'd like to of course give priority to the tasks running users who are currently online. I noticed there was a priority setting for tasks in celery, but it seems that rabbitmq does not support this. This thread http://groups.google.com/group/celery-users/browse_thread/thread/ac3b6123d63421e5/b7740def1389e87e?lnk=gst&q=priority#b7740def1389e87e suggests have two different queues, a high priority one and a low priority one, or setting a rate limit for lower priority tasks.

Does anyone have a good workaround to implement priority? Thanks in advance!

解决方案

As I understand it, and I've not yet done this, Ask covers this here:

http://docs.celeryproject.org/en/master/faq.html#does-celery-support-task-priorities [stable] http://docs.celeryproject.org/en/latest/faq.html#does-celery-support-task-priorities [latest]

这篇关于RabbitMQ上芹菜任务优先级的解决方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆