Created
November 21, 2012 22:31
-
-
Save nateberkopec/4128288 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# how can I change this middleware to only call Raven.captureException when a message is placed in the retries queue, let's say, for the third time? | |
module Raven | |
class Sidekiq | |
def call(worker, msg, queue) | |
begin | |
yield | |
rescue => ex | |
Raven.captureException(ex) | |
raise | |
end | |
end | |
end | |
end | |
::Sidekiq.configure_server do |config| | |
config.server_middleware do |chain| | |
chain.add ::Raven::Sidekiq | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That issue is covered in the FAQ, use an
after_commit
callback.