jesque icon indicating copy to clipboard operation
jesque copied to clipboard

check if a job exists

Open argvk opened this issue 9 years ago • 4 comments

We probably need a way to check if a job (delayed and recurring as well) exists in the queue. It is something that I find very useful while writing test cases. Something like an assertJob would be nice.

Thoughts ?

argvk avatar Aug 10 '15 13:08 argvk

Are you thinking this would just be a method for testing or part of the Jesque API?

gresrun avatar Aug 17 '15 13:08 gresrun

Just for testing.

argvk avatar Aug 17 '15 15:08 argvk

coming to think of it, it may of value to have a SETNX operation that would add the job if it doesn't exist already. thoughts @gresrun ?

argvk avatar Oct 26 '16 07:10 argvk

FWIW, I've done something similar on my fork, here's the diff https://github.com/gresrun/jesque/compare/master...argvk:recurring-nx

argvk avatar Nov 03 '16 14:11 argvk