[Feature Request] ability to filter delayed jobs
xurc opened this issue · comments
xurc commented
It would be great to be able to exclude delayed jobs in a "jobs" method. We use metrics for monitoring and alerts in case jobs for some reason begin to accumulate in the queue and now delayed jobs have to be filtered on the perl-side, which significantly affects performance.
I understand that I can just make a SQL-query directly to the database, but this is a kludge and I would like to have an honest filter in the minions API.
Something like:
# Count waiting jobs
say $minion->jobs({waiting => 1})->total;
Sebastian Riedel commented
I would make it say $minion->jobs({delayed => true/false})->total;
, but yes, that seems like a useful feature.