【问题标题】:Resque priority queue with Heroku & Procfile. Crashes使用 Heroku 和 Procfile 的 Resque 优先级队列。崩溃
【发布时间】:2011-12-21 01:06:40
【问题描述】:

在我的本地机器上我可以做

QUEUES=a,b,c,d rake resque:work

它会按顺序处理这些队列。但是,在 Heroku Cedar 上,我将其添加到我的 procfile 中:

worker: QUEUES=a,b,c,d exec bundle exec rake resque:work

它会在部署时使应用程序崩溃。我可能错过了一些愚蠢的东西,但我很难过。

PS 我在命令前加上 exec,因为 resque 的错误不能正确减少工作人员的数量。

【问题讨论】:

  • 你在部署时使用的是resque的gem 'resque', :git => 'http://github.com/hone/resque.git', :branch => 'keepalive'这个分支吗?
  • 您是否收到任何错误,无论是在控制台中还是在日志中?
  • 得到一个错误:错误:没有这样的文件或目录-

标签: ruby-on-rails-3 heroku resque


【解决方案1】:

您不应该需要初始的exec。条目应如下所示:

worker: bundle exec rake resque:work QUEUE=a,b,c,d

使用@hone 的叉子在员工退出时正确清理他们。在您的 Gemfile 中:

gem 'resque', git: 'https://github.com/hone/resque.git', branch: 'heroku', require: 'resque/server'

【讨论】:

  • 我删除了 exec 并最终使用了 John 提到的 keepalive 分支。这为我解决了问题。
猜你喜欢
  • 1970-01-01
  • 2021-02-06
  • 1970-01-01
  • 2011-12-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-03-20
  • 1970-01-01
相关资源
最近更新 更多