-
-
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
until_and_while_executing is not running the job at all in sidekiq-unique-jobs 7.1.4 #626
Comments
It does say you have a duplicate, could it be that #624 caused this? It is the only thing I can think of. |
Exept removing all keys for 'uniquejobs:*' from Redis I also tried passing different arguments to worker |
Actually this scenario is misleading because in all honesty there is no lock so it shouldn't happen. I have seen someone mention this in the past but it should have been fixed and the only culprit it can be is #624. Unless it is one of those old unexplainable situations... Are you using redis namespace? |
I've tested sidekiq-unique-jobs 7.1.3 and it works fine. The bug was introduced in the 7.1.4 version. Before testing each version I cleared Redis keys with: r=REDIS_SIDEKIQ.keys('uniquejobs:*')
r.each { |k| REDIS_SIDEKIQ.del(k) } |
Yes. |
I can kind of simulate the problem. it "waits for brpoplpush when resolving the promise" do
allow(locksmith_one).to receive(:brpoplpush)
.with(anything, lock_timeout, &slow_brpoplpush)
.and_call_original
did_we_get_in = false
locksmith_one.execute do
did_we_get_in = true
end
expect(locksmith_one).to have_received(:brpoplpush)
expect(did_we_get_in).to be true
end That works but now I have a warning saying:
There is no other stub of that method. No idea what is going on but I will restart my computer now :) |
I did some tests: sidekiq-unique-jobs 7.1.4
Output from Sidekiq:
I downgraded sidekiq-unique-jobs 7.1.3
|
apologies for the regression @mhenrixon! What was the issue with passing in |
@millerjs not your fault, the issue was older than that. I (am the most likely scoundrel), had That was most likely the main issue, the code should have worked as it was and now the test you wrote is passing with a minimal change. Someone is still having a similar issue in the latest issue opened that jobs are just skipped so it seems there is still some minor adjustment to be done. |
Describe the bug
I've upgraded sidekiq-unique-jobs from 7.1.2 to 7.1.4 and I noticed that the worker with a strategy
until_and_while_executing
does not process the job at all.Expected behavior
I expect the job to be processed.
Current behavior
When I run in rails console in the development environment:
Then I see in sidekiq logs:
I expect it should print
It works
.Worker class
When I added
on_conflict
then I see raised error.Error raised for
on_conflict
:Additional context
I was wondering that maybe there are some data left in Redis between sidekiq-unique-jobs 7.1.2 and 7.1.4 upgrade so I removed all keys:
It did not help. I still see the problem. The job content
puts It works
is not executed at all.The text was updated successfully, but these errors were encountered: