雷斯克+西纳特拉 + Heroku 如何连续运行作业
我已经设置了 Redis + Resque 并部署在 heroku 上。一切正常,作业已正确添加到队列中。 之前它不会运行
但在我运行命令heroku 运行 rake 工作:工作
我如何告诉heroku在后台自动运行队列中的作业?
我使用的是 Sinatra 而不是 Rails。
非常感谢。
I have already setup Redis + Resque and deploy on heroku already. Everything works fine, and the jobs are added to the queue correctly. But it won't be run until I run command
heroku run rake jobs:work
How do I tell heroku to run the jobs in the queue automatically in background?
I'm using Sinatra and not Rails.
Thank you very much.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要向应用程序添加一个工作进程,该进程将自动为您连续运行
rake jobs:work
进程。您可以通过 Heroku 上的 UI 执行此操作。
You need to add a worker process to your application that will automatically run the
rake jobs:work
process for you continuously.You can do this via the UI on Heroku.
使用 IronWorker 有一种更好的(恕我直言)方法可以做到这一点。 Iron.io 基本上总是更便宜,而且我发现这种方法更容易设置和使用。 http://www.iron.io/
There is a much better (IMHO) way to do this using IronWorker. Iron.io will basically always be cheaper, and I find the approach easier to set up and use. http://www.iron.io/