Search code examples
ruby-on-rails-3.2delayed-job

How to run a delayed_job?


I am trying to run a job in delayed_jobs .I used the syntax "Mailer.delay.somefunction()".It is present in the delayed_jobs table in the database but doesnt execute.How can i make it run or why it is not running?


Solution

  • I found some useful commands for manually invoking the delayed_jobs from the queue.

    Delayed::Job.find(id).invoke_job
    Delayed::Worker.new.run(Delayed::Job.last)