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

Ignore lock when jobs spawned from another sidekiq worker #142

Closed
antonzaytsev opened this issue Oct 29, 2015 · 5 comments
Closed

Ignore lock when jobs spawned from another sidekiq worker #142

antonzaytsev opened this issue Oct 29, 2015 · 5 comments

Comments

@antonzaytsev
Copy link

Everything works correct, it is not spawn job twice (while it is in queue or processing), when I add job in queue from terminal manually. But somehow, when same job, with same params adds in queue it ignores lock and I have same job with same params processing by same sidekiq worker.

I have below sidekiq options for worker
sidekiq_options unique: :until_executed

Is anyone have idea what the problem can be?

@antonzaytsev
Copy link
Author

@mhenrixon please let me know if you have any thoughts. This issue is critical for production app. Thank you!

@mhenrixon
Copy link
Owner

Preferably to help you speed up a fix provide a failing example application or test.

@antonzaytsev
Copy link
Author

@mhenrixon thanks for response.
Here is simple app https://github.com/antonzaytsev/sidekiq-unique-jobs-app
Steps to reproduce:

  1. Install rails with database and bundle;
  2. Open web view localhost:3000/sidekiq
  3. Start sidekiq worker with bundle exec sidekiq -C config/sidekiq.yml
  4. Open terminal and spawn job twice to check if lock works SimpleWorker.perform_async '1'
  5. Right after add in queue another worker, which will spawn SimpleWorker SpawnSimpleWorker.perform_async '1'
  6. Check webview it will contain 2 processing SimpleWorker with same arg

@goodgravy
Copy link

@mhenrixon version 3.0.15 of the gem appears to have been shipped with this problem, and is still available on RubyGems. Could you yank it so that people can't use that version by accident?

Thanks!

@mhenrixon
Copy link
Owner

Done @goodgravy

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

3 participants