Skip to content
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

What does uniqueness mean in case of this gem? #30

Closed
kucaahbe opened this issue Feb 17, 2014 · 2 comments
Closed

What does uniqueness mean in case of this gem? #30

kucaahbe opened this issue Feb 17, 2014 · 2 comments

Comments

@kucaahbe
Copy link

I have a simple use-case:

  1. web server receives http request and schedules sidekiq job
  2. sidekiq job upon completion send http request (e.g. completion callback)

I want my sidekiq jobs to be unique during (for example) 2 hours. It means that after pushing some job with arguments {'a'=>1,'b'=>2} I do not want any other jobs with exactly same arguments to appear in queue and/or in "working" jobs regardless that first job state(successfully finished or failed). The result behavior that after first job finished I can add to queue other job with same arguments which is definitely not expected behavior (or am I missing something?).

So does it bug or feature?

Thanks!

@mhenrixon
Copy link
Owner

It is explained in the readme. b77f6a5 so just set the unique_expiration = :timeout and the job won't be processed again until the timeout occurs. I will investigate a way to make this more obvious in the near future.

@kucaahbe
Copy link
Author

got it, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants