开发者

Upgrading to Rails 3, resque scheduler and worker raise error

I have upgraded a Rails 2.3.5 app to Rails 3.0.6. In the process I have also upgraded the resque from 1.9.1 to 1.15.0 and resque_scheduler from 1.9.1 to 1.9.9. The following commands used to work fine with Rails 2.3.5

COUNT=1 QUEUE=scheduled_1_queue,another_queue,yet_another_queue,slow_queue,redis_cleanup_queue,immediate_queue RAILS_ENV=development JOBS_PER_FORK=500 rake resque:workers

rake resque:scheduler

But now after the upgrade when I run above commands I get following error:

rake aborted!
wrong number of arguments (0 for 1)

Tasks: TOP => resque:work => resque:setup => environment

The RakeFile is as following:

require File.expand_path('../config/application', __FILE__)
require 'rake'
require 'resque/tasks'
require 'resque_scheduler/tasks'
MyApp::Application.load_tasks

task "resque:setup" => :environment

If i comment the last line 'task "resque:setup" => :environment' in RakeFile the res开发者_如何学JAVAque scheduler and worker commands run without any error, but the scheduler does not schedule any tasks at all and stays on this:

2011-06-16 09:33:45 Schedule empty! Set Resque.schedule

I have also tried with older version of resque(1.9.1) and resque_scheduler(1.9.1) with Rails 3, but to no avail. I have also tried to run above commands with --trace, but it does not provide any trace info about the "wrong number of arguments (0 for 1)" error. I suspect I might need to provide more info, but don't know exactly what, please let me know what else is needed to answer this question. Thanks a lot.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜