开发者

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

For some reason, Delayed::Job's has decided to queue up but not excecute anything 开发者_JAVA技巧even though I've restarted it several times, even kill -9'd it and restarted it. It won't run any jobs.

Can I , in /console, specify a specific job and tell it to work?

Ex:.. Delayed::Job.find(x).run


You can also do it like this:

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


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜