Skip to content

Instantly share code, notes, and snippets.

@loopj
Last active May 25, 2017 09:01
Show Gist options
  • Save loopj/5200416 to your computer and use it in GitHub Desktop.
Save loopj/5200416 to your computer and use it in GitHub Desktop.
Send notifications to Bugsnag asynchronously using a thread
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