Permalink
Browse files

stop converting notice to xml before passing it to sender

  • Loading branch information...
1 parent 4b046f1 commit c5bd5748e91a866e39e07051a719f4e8e2ec010a @shime shime committed Sep 3, 2012
Showing with 4 additions and 6 deletions.
  1. +2 −4 README.md
  2. +1 −1 lib/airbrake/configuration.rb
  3. +1 −1 test/notifier_test.rb
View
@@ -275,7 +275,7 @@ configuration.
*Ruby 1.9+. It does not support Ruby 1.8 because of its poor threading*
*support.*
-For implementing custom asynchronous send, provide block to `config.async`. It
+For implementing custom asynchronous notice delivery, send a block to `config.async`. It
receives `notice` param. Pass it to `Airbrake.sender.send_to_airbrake` method
to do actual delivery. In this way it's possible to move Airbrake notification
even in background worker(e.g. Resque or Sidekiq).
@@ -284,9 +284,7 @@ even in background worker(e.g. Resque or Sidekiq).
Airbrake.configure do |config|
...
config.async do |notice|
- Thread.new {
- Airbrake.sender.send_to_airbrake(notice.to_xml)
- }
+ Thread.new { Airbrake.sender.send_to_airbrake(notice) }
end
end
@@ -300,7 +300,7 @@ def default_port
# Async notice delivery defaults to girl friday
def default_async_processor
queue = GirlFriday::WorkQueue.new(nil, :size => 3) do |notice|
- Airbrake.sender.send_to_airbrake(notice.to_xml)
+ Airbrake.sender.send_to_airbrake(notice)
end
lambda {|notice| queue << notice}
end
View
@@ -143,7 +143,7 @@ def set_development_env
Airbrake.configure do |config|
config.environment_name = 'production'
config.async do |notice|
- Airbrake.sender.send_to_airbrake(notice.to_xml)
+ Airbrake.sender.send_to_airbrake(notice)
end
end
exception = build_exception

0 comments on commit c5bd574

Please sign in to comment.