Skip to content

Commit

Permalink
Fix return value of base_lock
Browse files Browse the repository at this point in the history
When using the `on_conflict` `replace` strategy `base_lock` has to
return the return value of the conflict strategy. The replace strategy
removes the previous job from the scheduled/rety set or the queue.
It is then re-queued inside `lock_failed`/`call_strategy`, thus we have
to return the return value of which came from `lock` inside the block of
` client_strategy.call`.
  • Loading branch information
dsander committed Sep 26, 2021
1 parent 66fb5cc commit b3255e1
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/sidekiq_unique_jobs/lock/base_lock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ def prepare_item
def lock_failed(origin: :client)
reflect(:lock_failed, item)
call_strategy(origin: origin)
nil
end

def call_strategy(origin:)
Expand Down

0 comments on commit b3255e1

Please sign in to comment.