Last active
May 25, 2017 09:01
-
-
Save loopj/5200416 to your computer and use it in GitHub Desktop.
Send notifications to Bugsnag asynchronously using a thread
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
Bugsnag::Notification.class_eval do | |
class << self | |
def deliver_exception_payload_with_thread(*args) | |
Thread.new do | |
Bugsnag::Notification.deliver_exception_payload_without_thread(*args) | |
end | |
end | |
alias_method :deliver_exception_payload_without_thread, :deliver_exception_payload | |
alias_method :deliver_exception_payload, :deliver_exception_payload_with_thread | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment