简体   繁体   English

使用celery和rabbitmq在另一台服务器上执行任务

[英]Using celery and rabbitmq to execute a task on annother server

Currently we are working on a Python3 web-project where we have to execute a task for our pyramid application. 目前我们正在开发一个Python3 Web项目,我们必须为我们的金字塔应用程序执行任务。 The celery worker is located on another server. 芹菜工人位于另一台服务器上。 Our question is: How can we execute our task by using that worker on the other server and get the result. 我们的问题是:我们如何通过在另一台服务器上使用该worker来获取结果来执行我们的任务。 We'd have to use celery, rabbitMQ and amqp. 我们必须使用芹菜,rabbitMQ和amqp。

We already can execute a task when the worker is located at the same server as our pyramid project. 当工作人员与我们的金字塔项目位于同一服务器时,我们已经可以执行任务。 Can anyone help us or give an example of how we can fix this problem. 任何人都可以帮助我们或举例说明我们如何解决这个问题。 Cause we don't really know how to begin. 因为我们真的不知道如何开始。

http://img818.imageshack.us/img818/1051/drawing1x.jpg

Thanks in advance 提前致谢

The Celery First Steps should be a good place to begin. 芹菜第一步应该是一个好的开始。 If you don't have experience with RabbitMQ you may want to try Redis first. 如果您没有使用RabbitMQ的经验,您可能需要先尝试Redis。

I have found a solution, I have used the send_task method to use a task on another server. 我找到了一个解决方案,我使用了send_task方法在另一台服务器上使用任务。 and I had already read the first steps it is a very good begin to learn Celery. 我已经阅读了第一步,这是一个非常好的开始学习芹菜。 Thanks all for the responses!! 谢谢大家的回复!!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM