0

此查询与我的Google Summer of Code 项目有关。基本上,我有一个主节点,它将构建任务委托给许多指定的图像构建节点。现在,我使用手册“scp”进行操作,然后使用“ssh”策略进行远程执行。所以,我没有任何调度或任务分配 - 自动。

我现在正在寻找一种可能比我目前的策略更好的解决方案。我在看“芹菜”,并玩弄了一下。我已经能够远程运行一个简单的工作。但是,据我所知,芹菜需要工作节点的源文件。我也无法探索 celery 是否会进行自动任务分配/调度?我使用 RabbitMQ 作为代理。

我是新手,所以任何更有经验的人肯定可以建议芹菜是一个不错的选择,还是有什么更适合这个?

4

2 回答 2

0

I was a little confused. And I have it figured out. Celery will automatically choose one of the workers using the same broker. So, yes, it does the scheduling and distribution.

于 2012-06-04T15:49:12.153 回答
0

Celery does need access to the worker source, as really it's just a decorator around your functions that cause them to run differently. However, you can change what a worker node is. You just write a python script on the master node that does exactly what you have been doing (scp, ssh). This becomes the "worker". You'd then make a controlling script (feed file locations, urls, so on so forth) also on the master node and run that using Celery. The Celery server would then handle task scheduling, distribution, either via crontab like periodic taks (here) or you can just wait on the result of a running task (here) and then have it schedule a new one on finish.

于 2012-06-04T09:40:38.883 回答