Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check whether the delayed job is running in rails

I am designing a status page where I need to show whether the delayed job is running. Please help me with a way to find it in the code.

Am using Rails 3.0.20, ruby 1.8.7 (2011-06-30 patchlevel 352), and delayed_job 3.0.4

like image 403
Virtual Avatar asked Feb 14 '13 08:02

Virtual


People also ask

What is Delayed Job in Rails?

Delayed Job, also known as DJ, makes it easy to add background tasks to your Rails applications on Heroku. You can also use Resque and many other popular background queueing libraries. Delayed Job uses your database as a queue to process background jobs.

How does Delayed Job work?

Delayed::Job works by serializing a Ruby object as YAML and storing it in a database table so that a worker in a different process can retrieve, deserialize, and perform the requested work. Some operations that we use Delayed::Job for are longer-running data processing, sending emails, and updating search indicies.


1 Answers

With Rails 5.x you can ssh into your server and go into the /current folder within your app and run:

RAILS_ENV=production bin/delayed_job status
like image 108
pastullo Avatar answered Oct 14 '22 16:10

pastullo