在BackgroundRB崩溃的情况下如何恢复取消(已采取)的作业?
问题是:我们有一些作业在 Rails 应用程序的 BackgroundRB 中运行几秒到几分钟。但是,当我们部署新代码并在执行任务时重新启动BackgroundRB 时会发生什么? BackgroundRB 似乎没有拾取任何“已执行”的任务,并且我无法找到任何可以恢复这些任务的内容。
谁能告诉我BackgroundRB 是否以及如何提供恢复当backgroundrb 宕机时正在运行的任务?
我问这个问题的原因是,在作业结束时,一个新的作业会在未来的任意时间排队。
The problem: we have jobs that run from a few seconds to a few minutes in BackgroundRB from a Rails app. But, what happens when we deploy new code and restart BackgroundRB when it's performing a task? BackgroundRB does not seem to pick up any 'taken' tasks and I have not been able to find anything that can recover these tasks.
Can anyone tell me if and how BackgroundRB provides for recovering tasks that were running when backgroundrb goes down?
The reason I ask this question is that at the end of the job, a new job is queued in the future at an arbitrary time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一个可能的解决方案是在部署新应用程序时重置所有“占用”的作业。但这样做最合乎逻辑的地方是什么?我目前正在考虑 Rails 初始化器。
A possible solution would be to reset all 'taken' jobs when deploy a new application. But what'd be the most logical place to do this? I'm currently thinking a rails initializor.