How can I see the delayed job queue?

I wonder if I managed to execute Delayed :: Job . Cannot see jobs in delayed_jobs table.

  • This is normal?
  • Are there other ways to view the job queue?
+46
ruby-on-rails delayed-job
Sep 01 '13 at 22:30
source share
2 answers

DelayedJob saves a database entry for each installed job, so you can get them directly through the rails console (assuming you use ActiveRecord or the like).

Open the rail console:

 $> rails c 

and then request the given tasks:

 $> Delayed::Job.all 

or

 $> Delayed::Job.last 

Check out the documentation .

If you set delayed_job with another database such as Redis, you might want to go and check the jobs there in the queue.

+82
Sep 01 '13 at 22:42
source share
โ€” -

You should see the jobs in the delayed_jobs table, yes. But when the delayed task starts successfully, they are deleted. So it may just be a fleeting thing. (The Delayed Job checks the table for new jobs that run every 5 seconds, so recording can only last a few seconds on average for a job with a short run.) I usually make sure that the delayed job daemon is disabled if I want to check the payload objects in the table delayed_jobs.

+8
Sep 01 '13 at 23:37
source share



All Articles