diff --git a/Changes.md b/Changes.md index 72dd086e..22db7a9a 100644 --- a/Changes.md +++ b/Changes.md @@ -3,7 +3,7 @@ Please see [Upgrading.md](Upgrading.md) for more comprehensive upgrade notes. -- **Global Error Handlers** - blocks of code which process errors which +- **Global Error Handlers** - blocks of code which handle errors that occur anywhere within Sidekiq, not just within middleware. - **Dead Job Queue** - jobs which run out of retries are now moved to a dead job queue. These jobs must be retried manually or they will expire diff --git a/Upgrading.md b/Upgrading.md index 1c39e789..81789714 100644 --- a/Upgrading.md +++ b/Upgrading.md @@ -21,7 +21,7 @@ changes a few data elements in Redis. To upgrade cleanly: * Ruby 1.9 is no longer officially supported. Sidekiq's official support policy is to support the current and previous major releases of Ruby and Rails. As of February 2014, that's Ruby 2.1, Ruby 2.0, Rails 4.0 - and Rails 3.2. I will accept PRs to fix issues found by users. + and Rails 3.2. I will consider PRs to fix issues found by users. ## Error Service Providers @@ -33,9 +33,14 @@ just during job execution. ```ruby if Sidekiq::VERSION < '3' # old behavior + Sidekiq.configure_server do |config| + config.server_middleware do |chain| + chain.add MyErrorService::Middleware + end + end else Sidekiq.configure_server do |config| - config.error_handlers << Proc.new {|ex,context| ... } + config.error_handlers << Proc.new {|ex,context| MyErrorService.notify(ex, context) } end end ```