Skip to content

Commit

Permalink
remove not reachable code
Browse files Browse the repository at this point in the history
  • Loading branch information
ankithads committed Sep 3, 2024
1 parent 7d136d8 commit dfb3ba7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/que/adapters/active_record_with_lock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def execute(command, params = [])
def lock_job_with_lock_database(queue, cursor)
loop do
observe(duration_metric: FindJobSecondsTotal, labels: { queue: queue }) do
locked_job = Que.transaction do
Que.transaction do
job_to_lock = Que.execute(:find_job_to_lock, [queue, cursor])

return job_to_lock if job_to_lock.empty?
Expand All @@ -61,7 +61,6 @@ def lock_job_with_lock_database(queue, cursor)
observe(count_metric: FindJobHitTotal, labels: { queue: queue, job_hit: job_locked })
return job_to_lock if job_locked
end
return locked_job if locked_job
end
end
end
Expand Down

0 comments on commit dfb3ba7

Please sign in to comment.