-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discard duplicate jobs #176
Comments
@matteeyah, yes! I've got this on my mind as well! In the end, I'm not sure there's a version of #105 that I like or that it's useful for what we need, so I thought, in the meantime, to add another parameter to on_conflict: :discard By default, it'd be: on_conflict: :block which would be the current behaviour. |
That's exactly what I had in mind! For reference - We're currently using https://github.com/veeqo/activejob-uniqueness. It serves a slightly different purpose, but it also checks for duplicate jobs. It also has an |
Another vote for following the activejob-uniqueness conventions. I would note that of the strategies offered by the gem, |
Is there any more word on this? Or any openness to others trying to contribute? |
Hey @nhorton, sorry for the delay! I'm back at this now and would like to get this feature ready for version 1.0.
I think that would be the only strategy supported because of the way concurrency controls work. Right now jobs don't unblock other jobs or release the semaphore until they complete, and for simplicity, it'd be much easier to keep it that way.
Definitely! 🙌 |
@rosa Is there an ETA for 1.0 ? |
@bilby91, my hope is by the end of August but you know, there are always unexpected things 😅 😅 |
@rosa Awesome! I look forward to testing this feature. |
In the end I won't be able to get this one in for v1.0, but I hope to get it there shortly after. Sorry! |
Hey @rosa , any chance that this will come about sometime in the near/medium future? Would love to use this feature as well! |
I'm quite tight on time at the moment, but if someone wants to submit a PR, I'll be happy to review! |
@joelzwarrington yes, sorry! I was out at a conference since Wednesday last week and came back yesterday, and then had to catch up with a bunch of other stuff at work. |
Summary
The concurrency controls that currently exist allow blocking execution of "duplicate" jobs, or jobs with the same arguments. These jobs wait, then execute after the currently running job finishes. There's no way to discard all duplicate jobs and prevent them from running completely.
Proposal
Add a way to discard jobs that get blocked by the concurrency controls.
The text was updated successfully, but these errors were encountered: