sidekiq-unique-jobs icon indicating copy to clipboard operation
sidekiq-unique-jobs copied to clipboard

Conflict strategy "update"?

Open tsauerwein opened this issue 6 years ago • 1 comments

Is your feature request related to a problem? Please describe. There is the new conflict strategy replace, which removes jobs with the same unique_args from the queue and adds a new job. The problem is that this new job is added to the end of the queue. In my particular case this might create a situation where the job for a particular entity will never be executed because it's always added to the end of the queue.

Describe the solution you'd like A conflict strategy update which keeps the position in the queue would resolve that problem.

Describe alternatives you've considered ?

Additional context I am not sure updating the job in the queue is feasible. Instead of using LREM to delete the job, a combination of LINSERT BEFORE/AFTER + LREM might be an option.

tsauerwein avatar Aug 16 '18 11:08 tsauerwein

Hi @tsauerwein and thanks for the suggestion. This definitely sounds like a good addition, I'll take it into consideration.

mhenrixon avatar Aug 16 '18 12:08 mhenrixon