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

前端 未结 3 1393
余生分开走
余生分开走 2021-01-30 03:39

For some reason, Delayed::Job\'s has decided to queue up but not excecute anything even though I\'ve restarted it several times, even kill -9\'d it and restarted it. It won\'t r

相关标签:
3条回答
  • 2021-01-30 04:07

    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.

    0 讨论(0)
  • 2021-01-30 04:14

    You can also do it like this:

    Delayed::Worker.new.run( Delayed::Job.find(x) ) 
    
    0 讨论(0)
  • 2021-01-30 04:30

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

    0 讨论(0)
提交回复
热议问题