如何让多个芹菜工人执行相同的任务?

时间:2022-02-02 20:29:06

I have one task that is checking a url speed, but i want that to be executed by multiple celery workers in different servers. I want the same url to be checked by multiple workers.

我有一个任务是检查网址速度,但我希望由不同服务器中的多个芹菜工人执行。我希望多个工作人员检查相同的URL。

How can I do that?

我怎样才能做到这一点?

1 个解决方案

#1


7  

If you could set ignore_result=True . Try Broadcast

如果你可以设置ignore_result = True。试试广播

If you couldn't, check Routing Tasks and send the task multiple times to different queues, for different IDC for example, and corresponding workers.

如果不能,请检查路由任务并将任务多次发送到不同的队列,例如,针对不同的IDC和相应的工作人员。

#1


7  

If you could set ignore_result=True . Try Broadcast

如果你可以设置ignore_result = True。试试广播

If you couldn't, check Routing Tasks and send the task multiple times to different queues, for different IDC for example, and corresponding workers.

如果不能,请检查路由任务并将任务多次发送到不同的队列,例如,针对不同的IDC和相应的工作人员。