如何不使用Rails启动Resque [英] How to start resque not using rails
本文介绍了如何不使用Rails启动Resque的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用红宝石(而不是导轨),并且已经安装了resque gem.根据手册,我应该使用以下命令启动工作程序:
I am using ruby (not rails) and I have install resque gem. According to the manual, I should start the workers using the following command:
resque work
但是此命令根本不会启动工作程序(我已经检查过bin/中的resque文件,它根本不接受工作").
But this command doesn't start the workers at all (I have checked that resque file in bin/ and it doesn't accept 'work' at all).
以下是输出:
Usage: resque [options] COMMAND
Options:
-r, --redis [HOST:PORT] Redis connection string
-N, --namespace [NAMESPACE] Redis namespace
-h, --help Show this message
Commands:
remove WORKER Removes a worker
kill WORKER Kills a worker
list Lists known workers
推荐答案
使用以下方法创建rakefile:
Created rakefile with:
require "resque/tasks"
并运行resque:
rake resque:work QUEUE=*
这篇关于如何不使用Rails启动Resque的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文