RabbitMQ 和 Celery 的新手问题
今天早上我开始使用 Celery 和 RabbitMQ 并定义了一些基本任务来看看我的服务器的性能将如何提高。
我已经添加了我的rabbitmq 用户、虚拟主机并设置了我的权限。 启动了我的 RabbitMQ 服务器
在一个非常详细的教程中,我发现这些人使用 celerybeat 和 celeryd 来查看某些任务的状态,并执行它们。
你是否还需要芹菜,或者我采取的步骤是否足够?
我在任何地方都没有看到任何关于此的信息或注释......只是问
I started playing around with Celery and RabbitMQ this morning and defined some basic tasks to see how the performance will improve on my server.
I have added my rabbitmq user, vhosts and set my permissions.
Started my RabbitMQ server
In a very detailed tutorial I found these guys use celerybeat and celeryd to see the status of some task, and also to execute them.
the detailed tutorial by Rich Leland
Do you also need celery somehow, or are the steps I have taken enough?
Nowhere did I see any info or notes about this... just asking
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,您需要运行某种 celery 进程才能处理队列中的任务。 celeryd 进程监听队列,并根据您的设置执行任务。如果您没有运行 celeryd 进程,您只需将任务添加到队列中,但永远不会清空它。
如果您只是想查看队列,我建议您安装 RabbitMQ 管理插件。
Well, you'll need to have some sort of celery process running in order to handle tasks in the queue. The celeryd process listens on the queue, and executes tasks according to your settings. If you don't have a celeryd process running, you'll just be adding tasks to the queue, but never emptying it.
If you're just interested in seeing your queues, I'd recommend installing the RabbitMQ management plugin.
http://ask.github.com/celery/getting-started/introduction.html
RabbitMQ 有访客登录,因此这是一种更快的入门方式。将其放入 celeryconfig.py:
为了快速测试,将其放入tasks.py:
在同一目录中启动 celeryd 有 celeryconfig.py 和tasks.py:
最后,运行tasks.py
http://ask.github.com/celery/getting-started/introduction.html
RabbitMQ has a guest login, so that's a faster way to get started. Put this in celeryconfig.py:
For a quick test, put this in tasks.py:
Start celeryd in the same directory has celeryconfig.py and tasks.py:
Finally, run tasks.py