Skip to content

Commit

Permalink
Clear context *before* each Sidekiq job.
Browse files Browse the repository at this point in the history
Per #63, This prevents the context from being cleared before the error handler can report it (which happens up the stack, and isn't always job-specific).
  • Loading branch information
Joshua Wood committed Mar 13, 2014
1 parent c3ac638 commit 2423a65
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/honeybadger/integrations/sidekiq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ module Integrations
module Sidekiq
class Middleware
def call(worker, msg, queue)
begin
yield
ensure
Honeybadger.context.clear!
end
Honeybadger.context.clear!
yield
end
end
end
Expand Down

0 comments on commit 2423a65

Please sign in to comment.