Skip to content

Commit 6573dbb

Browse files
authored
Remove unused Shutdown class (#940)
The Shutdown class has been unused since the Celluloid removal in 2016. It was originally used to raise on worker threads during hard shutdown, but the current shutdown flow uses Interrupt and executor-level shutdown. Additionally, Shutdown inherited from Interrupt (not BaseError), making it fundamentally different from the other error classes in the Errors module. Its role was as a control flow signal, not an actual error.
1 parent fd99df8 commit 6573dbb

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@
88
- `Shoryuken::Errors::InvalidEventError` for invalid lifecycle event names
99
- `Shoryuken::Errors::InvalidDelayError` for delays exceeding SQS 15-minute maximum
1010
- `Shoryuken::Errors::InvalidArnError` for invalid ARN format
11-
- `Shoryuken::Errors::Shutdown` for graceful shutdown (replaces `Shoryuken::Shutdown`)
1211
- Replaces generic Ruby exceptions (ArgumentError, RuntimeError) with specific error types
13-
- Code rescuing `Shoryuken::Shutdown` must change to `Shoryuken::Errors::Shutdown`
12+
13+
- Removed: `Shoryuken::Shutdown` class
14+
- This class was unused since the Celluloid removal in 2016
15+
- Originally used to raise on worker threads during hard shutdown
16+
- Current shutdown flow uses `Interrupt` and executor-level shutdown instead
1417

1518
- Fix: Raise ArgumentError when using delay with FIFO queues
1619
- FIFO queues do not support per-message DelaySeconds

lib/shoryuken/errors.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,5 @@ module Errors
2929

3030
# Raised when an ARN format is invalid
3131
InvalidArnError = Class.new(BaseError)
32-
33-
# Exception raised to trigger graceful shutdown of the server
34-
# @see https://github.com/mperham/sidekiq/blob/33f5d6b2b6c0dfaab11e5d39688cab7ebadc83ae/lib/sidekiq/cli.rb#L20
35-
Shutdown = Class.new(Interrupt)
3632
end
3733
end

0 commit comments

Comments
 (0)