go-workers2
go-workers2 copied to clipboard
Requaos/unique jobs
This feature sat around for awhile and missed out on being included in the store interface... any recommendations on if there are any special methods to add there? maybe a method to get a list of all uniquely enqueued jobs?
@stefannegrea Also, since the shift to a store interface, I just removed my modification to the Acknowledge
method. If we are enqueueing a unique job, it checks before insert if there is already a job in that queue with the same args. I had code tucked under the Acknowledge
method to LRem
with a count of 0
so it nukes all elements with that set of args. It was for safety that I put the guard on both ends, but I guess it really only needs it on insert. If we actually wanted that behavior, would you be willing to bend on that interface definition? If so, would you prefer passing an integer directly or a boolean for unique on non-unique?
You can merge this whenever you want, if you want.
Nice job @requaos! What's the status on getting this in @stefannegrea?