Daniel Sagayaraj
Daniel Sagayaraj

Reputation: 317

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?

Upvotes: 1

Views: 1487

Answers (1)

Daniel Sagayaraj
Daniel Sagayaraj

Reputation: 317

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)

Upvotes: 3

Related Questions