具有非同质任务的 Celery

发布于 2024-10-03 11:03:38 字数 104 浏览 1 评论 0原文

我有两个celery工人,工人1有任务A和B,工人2有任务A,B和C。如果我提交任务C,它似乎没有在有任务C的celery工人中执行;有什么方法可以确保只有工作人员 2 获得分配的任务 C 吗?

I have two celery workers, worker 1 has tasks A and B, worker 2 with tasks A, B, and C. If I submit a task C, it doesn't seem to be executed in the celery worker that has task C; is there some way I can make sure that only worker 2 gets assigned tasks C?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

妥活 2024-10-10 11:03:38

我会查看文档中的路由任务。您可以创建具有特定主题的队列,并指定哪些工作线程可以处理哪些队列。

I'd take a look at routing tasks in the documentation. You can create queues with specific topics, and specify which worker(s) can handle which queue(s).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文