-
-
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
Documentation Not Clear #78
Comments
@adsteel the uniqueness is based on arguments you configure in the unique_args method or we will create a unique hash from all the arguments the My best suggestion for figuring it out is to check the test suite. It should cover the basics but you raise a valid point. Maybe we need more of an examples directory with all the various ways to configure uniqueness. |
@mhenrixon Thanks. I think I misspoke. I said 'what does that mean?', but I meant 'how is that implemented'? More specifically, what happens if I put two different jobs in the queue that each match the uniqueness constraint? Does the first job block until the second performs? Is the second never performed? |
@mhenrixon @adsteel's question is a good one - I'm equally confused about this very same thing. Also what does this mean (https://github.com/mperham/sidekiq/wiki/Related-Projects) in relation to this project?
|
Alright, by looking at the specs it seems that the job is just discarded - not the correct behaviour for my use-case - ah well. |
Agreed. Documentation is unclear. Is this gem for unique queues or unique workers? The former means (job type, *args) can only exist once per queue, e.g. the queue acts as an ordered set. The latter means (job type, *args) can only be worked on by one worker at a time. Which does this gem do? |
@cjbottaro both! You can make a job unique in a specific queue or across all queues. You can also decide when the uniqueness is enforced within that restriction like if the job should only be considered unique while it is running or if the uniqueness should be until before or after it is processed. |
Documentation has been improved and so has test suites, naming etc. |
I'm trying to understand what this gem does, but the documentation isn't very clear on a basic level. So we're making jobs
unique
based on worker and arguments. What does that mean? Is only one unique job allowed in the queue at a time? (Meaning that if I put two different jobs in the queue that each match theunique_args
constraint, is the second job never executed?) Or are two unique jobs allowed in the queue, but the latter always executed after the former has concluded?The text was updated successfully, but these errors were encountered: