Skip to content

Commit

Permalink
Merge pull request #300 from Shopify/cbruckmayer/fix-rescue
Browse files Browse the repository at this point in the history
Fix rescue
  • Loading branch information
ChrisBr authored Jan 6, 2025
2 parents d23f35d + 5cc9f0c commit 2591d15
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions ruby/lib/ci/queue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ module Queue

attr_accessor :shuffler, :requeueable

Error = Class.new(StandardError)

module Warnings
RESERVED_LOST_TEST = :RESERVED_LOST_TEST
end
Expand Down
5 changes: 2 additions & 3 deletions ruby/lib/ci/queue/redis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
module CI
module Queue
module Redis
Error = Class.new(StandardError)
LostMaster = Class.new(Error)
ReservationError = Class.new(Error)
LostMaster = Class.new(CI::Queue::Error)
ReservationError = Class.new(CI::Queue::Error)

class << self

Expand Down
2 changes: 1 addition & 1 deletion ruby/lib/minitest/queue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def run_from_queue(reporter, *)
reopen_previous_step
puts red("The heartbeat process died. This worker is exiting early.")
exit!(41)
rescue CI::Queue::Redis::Error
rescue CI::Queue::Error
reopen_previous_step
puts red("#{error.class}: #{error.message}")
error.backtrace.each do |frame|
Expand Down

0 comments on commit 2591d15

Please sign in to comment.