From abdac0ee0323366e98ea686070168c30523e7b9e Mon Sep 17 00:00:00 2001 From: Maciej Mensfeld Date: Sat, 27 Dec 2025 15:09:33 +0100 Subject: [PATCH] Remove unused Shutdown class 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. --- CHANGELOG.md | 7 +++++-- lib/shoryuken/errors.rb | 4 ---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce039898..d8ee7ccb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,9 +8,12 @@ - `Shoryuken::Errors::InvalidEventError` for invalid lifecycle event names - `Shoryuken::Errors::InvalidDelayError` for delays exceeding SQS 15-minute maximum - `Shoryuken::Errors::InvalidArnError` for invalid ARN format - - `Shoryuken::Errors::Shutdown` for graceful shutdown (replaces `Shoryuken::Shutdown`) - Replaces generic Ruby exceptions (ArgumentError, RuntimeError) with specific error types - - Code rescuing `Shoryuken::Shutdown` must change to `Shoryuken::Errors::Shutdown` + +- Removed: `Shoryuken::Shutdown` class + - This class was unused since the Celluloid removal in 2016 + - Originally used to raise on worker threads during hard shutdown + - Current shutdown flow uses `Interrupt` and executor-level shutdown instead - Fix: Raise ArgumentError when using delay with FIFO queues - FIFO queues do not support per-message DelaySeconds diff --git a/lib/shoryuken/errors.rb b/lib/shoryuken/errors.rb index e6c77377..1f296c1a 100644 --- a/lib/shoryuken/errors.rb +++ b/lib/shoryuken/errors.rb @@ -29,9 +29,5 @@ module Errors # Raised when an ARN format is invalid InvalidArnError = Class.new(BaseError) - - # Exception raised to trigger graceful shutdown of the server - # @see https://github.com/mperham/sidekiq/blob/33f5d6b2b6c0dfaab11e5d39688cab7ebadc83ae/lib/sidekiq/cli.rb#L20 - Shutdown = Class.new(Interrupt) end end