Heroku - DelayedJob & 延迟作业自动缩放
我非常想知道在 Heroku 上使用这个 延迟作业分支。唯一的问题是我不明白为什么它不起作用。
到目前为止我所得到的:
我已经将分支安装为插件。 添加了两行配置,如 分支注释中所述:
Delayed::Job.destroy_failed_jobs = false
silence_warnings do
Delayed::Job.const_set("MAX_ATTEMPTS", 3)
Delayed::Job.const_set("MAX_RUN_TIME", 5.minutes)
Delayed::Job.auto_scale = true # < --- this
Delayed::Job.auto_scale_manager = :heroku # < --- and this
end
我还添加了另一位分支评论者详细描述了宝石热潮。
我收到了错误消息:
MissingSourceFile (no such file to load -- heroku):
...我认为这是当我的应用程序尝试与 heroku 的 api 进行通信时。但如何解决这个问题我不清楚。任何建议将非常感激。
I'm pretty much in wonder of the idea of autoscaling workers on Heroku with this delayed job branch. Only problem is I can't figure out why it won't work.
What I've got thus far:
I've installed the branch as a plugin.
Added the two lines of configuration as described in the branch comments:
Delayed::Job.destroy_failed_jobs = false
silence_warnings do
Delayed::Job.const_set("MAX_ATTEMPTS", 3)
Delayed::Job.const_set("MAX_RUN_TIME", 5.minutes)
Delayed::Job.auto_scale = true # < --- this
Delayed::Job.auto_scale_manager = :heroku # < --- and this
end
I also added a gem rush as was detailed by another branch commenter.
I am returned the error message:
MissingSourceFile (no such file to load -- heroku):
...which I assume is when my application is trying to communicate with heroku's api. How though to resolve this I'm not clear on. Any advice would be very much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要将
heroku
gem 添加到 Gem 清单文件 (.gems
) 或 Gemfile 中。You need to add the
heroku
gem to your Gem manifest file (.gems
) or your Gemfile.