collectiveidea / delayed_job

Database based asynchronous priority queue system -- Extracted from Shopify
http://groups.google.com/group/delayed_job
MIT License
4.81k stars 955 forks source link

Add option to exclude currently locked jobs in `jobs:check`. #1127

Closed joshuapinter closed 3 years ago

joshuapinter commented 3 years ago

If a job is currently being processed, it would be nice to have an option to exclude them from being reported in jobs:check.

jobs:check’s primary purpose is to see the currently outstanding jobs in the queue. This is great if the jobs are super quick, but we have some very long-running jobs that show up in the response as well, which we don't care about. i.e. We only care about jobs that have yet to start.

So making an option in jobs:check to exclude currently processing jobs would be ideal to fit our needs and potentially others. Keeping the default to include processing jobs means no breaking changes.

We forked and have been using our fork of this for some time in production. Here's the PR to add this:

https://github.com/collectiveidea/delayed_job/pull/1087

albus522 commented 3 years ago

Duplicate of PR, please do not post both.