-
Hi, I am sorry in advance if it is inappropriate to ask questions here. I was wondering if anyone could point me in the right direction to create this behavior: Let's say I queue MyJob(param=123). I cannot re-queue MyJob(param=123) until it is executing(in-progress). (Behavior of until_executing). The edge case here is while MyJob(param=123) is executing, it should be able to queue again the same job, but it should wait until the first MyJob(param=123) is done before running the second instance with the same param. According to the doc, there is a on_conflict: :reschedule, however it's not exactly this behavior I am looking for. The correct behavior would be : :reject if job with same param is already queued Thanks in advance :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
This would do the trick. sidekiq_options on_conflict: { client: :reject, server: :reschedule } |
Beta Was this translation helpful? Give feedback.
This would do the trick.