-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
Uniqueness across workers #210
Comments
quick hack to fix that issue: module SidekiqUniqueJobs
class UniqueArgs
def digestable_hash
hash = @item.slice(CLASS_KEY, QUEUE_KEY, UNIQUE_ARGS_KEY)
hash.delete(QUEUE_KEY) if unique_on_all_queues?
hash.delete(CLASS_KEY) # this line makes difference
hash
end
end
end |
Never thought of that. What is the use case more specifically? |
@mhenrixon I have a bunch of workers (different) that operate on the same resource and I would love to be able to ensure that only one is working on it at the same time. Situation in rare but can happen. |
Closed by aabcd28 |
@mhenrixon thank you. You've made my day with that one! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an option to realize uniquness across workers without hacking the
digestable_hash
method? I know there's an option to ensure uniqueness across queues but what about workers?The text was updated successfully, but these errors were encountered: