Skip to content

Commit

Permalink
Force reraise to be passed
Browse files Browse the repository at this point in the history
  • Loading branch information
npezza93 committed Oct 6, 2024
1 parent 221e6d9 commit a48974e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/models/solid_queue/claimed_execution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def release_all
end
end

def fail_all_with(error, reraise: true)
def fail_all_with(error, reraise:)
SolidQueue.instrument(:fail_many_claimed) do |payload|
includes(:job).tap do |executions|
executions.each { |execution| execution.failed_with(error, reraise: reraise) }
Expand All @@ -63,7 +63,7 @@ def perform
if result.success?
finished
else
failed_with(result.error)
failed_with(result.error, reraise: true)
end
ensure
job.unblock_next_blocked_job
Expand All @@ -82,7 +82,7 @@ def discard
raise UndiscardableError, "Can't discard a job in progress"
end

def failed_with(error, reraise: true)
def failed_with(error, reraise:)
transaction do
job.failed_with(error)
destroy!
Expand Down
2 changes: 1 addition & 1 deletion app/models/solid_queue/process/executor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module Executor
after_destroy :release_all_claimed_executions
end

def fail_all_claimed_executions_with(error, reraise: true)
def fail_all_claimed_executions_with(error, reraise:)
if claims_executions?
claimed_executions.fail_all_with(error, reraise: reraise)
end
Expand Down

0 comments on commit a48974e

Please sign in to comment.