Heroku - DelayedJob & 延迟作业自动缩放

发布于 2024-09-16 03:42:19 字数 865 浏览 6 评论 0原文

我非常想知道在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

止于盛夏 2024-09-23 03:42:19

您需要将 heroku gem 添加到 Gem 清单文件 (.gems) 或 Gemfile 中。

You need to add the heroku gem to your Gem manifest file (.gems) or your Gemfile.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文