We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug The ruby reaper is reaping active jobs. It appears the job json being returned from sidekiq is different than what is expected.
Expected behavior If a job is active, it shouldn't be reaped.
Current behavior The ruby reaper is reaping active jobs.
Worker class
module Debugging class ProcessWorker include Sidekiq::Worker sidekiq_options queue: "default", retry: 0, lock: :until_executed, on_conflict: :log def perform puts "Starting ProcessWorker" sleep(5) puts "Finishing ProcessWorker" end end end
Additional context
sidekiq: v5.2.9 sidekiq-unique-jobs: v7.0.0.beta27
I believe the problem is here: return true if load_json(job)[LOCK_DIGEST] == digest
return true if load_json(job)[LOCK_DIGEST] == digest
If I log load_json(job), this is what I get:
load_json(job)
{ queue: "default", payload: { class: "Debugging::ProcessWorker", args: [], retry: 0, queue: "default", lock: "until_executed", on_conflict: "log", jid: "c81cb486b2d73357d97e57ba", created_at: 1609964935.1892679, lock_timeout 0, lock_ttl: nil, lock_prefix: "uniquejobs", lock_args: [], lock_digest: "uniquejobs:512613aedf8d8099a473a343e0bc352c", enqueued_at: 1609964935.202131 }, run_at: 1609964935 }
Replacing that line with the below fixes the issue for me: return true if load_json(job)["payload"][LOCK_DIGEST] == digest
return true if load_json(job)["payload"][LOCK_DIGEST] == digest
The text was updated successfully, but these errors were encountered:
Doh! Nice find :) I'll see about getting that fixed
Sorry, something went wrong.
Fix active check for the worker hash
dc54d05
Close #557
Fix active check for the worker hash (#558)
3039992
* Fix active check for the worker hash Close #557 * Fix test and add constant * Mandatory rubocop commit * Mandatory rubocop commit * Fix spec for 5.2
Released as v7.0.0.beta28
v7.0.0.beta28
PS. I am impressed with the find @courtneymiller2010, I know the gem isn't super easy to debug!
@mhenrixon Thanks for the quick fix!
mhenrixon
Successfully merging a pull request may close this issue.
Describe the bug
The ruby reaper is reaping active jobs. It appears the job json being returned from sidekiq is different than what is expected.
Expected behavior
If a job is active, it shouldn't be reaped.
Current behavior
The ruby reaper is reaping active jobs.
Worker class
Additional context
sidekiq: v5.2.9
sidekiq-unique-jobs: v7.0.0.beta27
I believe the problem is here:
return true if load_json(job)[LOCK_DIGEST] == digest
If I log
load_json(job)
, this is what I get:Replacing that line with the below fixes the issue for me:
return true if load_json(job)["payload"][LOCK_DIGEST] == digest
The text was updated successfully, but these errors were encountered: