Created
July 26, 2012 11:55
-
-
Save malditogeek/3181653 to your computer and use it in GitHub Desktop.
monkeypatch
This file contains 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
# Send notifications to Airbrake asynchronously using em-http. | |
# Doesn't handle Airbrake conn options but works for the default settings. | |
module Airbrake | |
class Sender | |
def send_to_airbrake(data) | |
client = EM::HttpRequest.new(url) | |
client.post(:head => HEADERS, :body => data) | |
rescue => ex | |
p [:AIRBRAKE_ERROR, ex.message, data] | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment