Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 3 在heroku上设置重调间隔_Ruby On Rails 3_Heroku_Resque - Fatal编程技术网

Ruby on rails 3 在heroku上设置重调间隔

Ruby on rails 3 在heroku上设置重调间隔,ruby-on-rails-3,heroku,resque,Ruby On Rails 3,Heroku,Resque,如果我部署到heroku并希望设置resque间隔,如何使用如下所示的resque.rake文件来实现这一点: # any chance to put that "Interval=0.1" in here? task "resque:setup" => :environment do ENV['QUEUE'] = '*' end task "jobs:work" => "resque:work" heroku是否注意到了间隔?(由于识别heroku上队列中的作业需要很长时间

如果我部署到heroku并希望设置resque间隔,如何使用如下所示的resque.rake文件来实现这一点:

# any chance to put that "Interval=0.1" in here?
task "resque:setup" => :environment do
  ENV['QUEUE'] = '*'
end

task "jobs:work" => "resque:work"
heroku是否注意到了间隔?(由于识别heroku上队列中的作业需要很长时间,目前大约需要15秒) 谢谢


(设置:ruby 1.9.2,rails 3.0.1,heroku cedar stack,resque,hirefire gem)

这里的游戏有点晚了,但是间隔看起来像一个环境变量

应该能够做到:

task "resque:setup" => :environment do
  ENV['QUEUE'] = '*'
  ENV['INTERVAL'] = 0.1
end

task "jobs:work" => "resque:work"

这是正确的-在
resque\tasks.rb
中,任务是使用以下方法启动的:
worker.work(ENV['INTERVAL']|5)