How do you tell a specific Delayed::Job to run in console?

佐手、 提交于 2019-12-02 14:20:40

answering how to run specific job from console:

Delayed::Job.find(x).invoke_job

but you must remember that it won't run any other things like destroying job that was done or so on. just running the job/task.

David Tuite

You can also do it like this:

Delayed::Worker.new.run( Delayed::Job.find(x) ) 

On Heroku I had a "stuck" job and just had to run heroku restart for the worker/job to start again.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!