I'm new to delayed_job and i'm starting to write my own "custom jobs". Each custom job is basically just a regular ruby class but i'm not sure where these custom job classes are normally stored within the project's directory structure.
I'm thinking lib, but lib seems to be a junk drawer at this point :/ (maybe that's ok though)
Thanks!!
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.
The most simple way to check whether delayed_job is running or not, is to check at locked_by field. This field will contain the worker or process locking/processing the job. Running Delayed::Job. where('locked_by is not null') will give you some results, if there are jobs running.
The common way for that is to create jobs
folder under app
folder. But the only thing you should care about is that they are your files, so do it in a way you find most comfortable for yourself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With