在开发模式下招聘多名工人 [英] Resque multiple workers in development mode

查看:71
本文介绍了在开发模式下招聘多名工人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在开发过程中可以同时运行多个Resque工人吗?我找到了这段代码,但是不确定它是否能工作以及如何工作.

Hi is it possible to run multiple Resque workers simultaneously in development? I found this bit of code, but not sure if it will work and how..

http://pastebin.com/9GKk8GwR

到目前为止,我正在使用标准

So far I am using the standard

bundle exec env rake resque:work QUEUE='*'

redis-server /usr/local/etc/redis.conf

推荐答案

您需要添加COUNT环境变量,然后将resque:work更改为resque:workers.例如,要启动3个工人:

You need to add a COUNT environment variable and then change resque:work to resque:workers. For example, to start 3 workers:

bundle exec env rake resque:workers QUEUE='*' COUNT='3'

这篇关于在开发模式下招聘多名工人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆