Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use async? instead of asnyc

  • Loading branch information...
commit 4ed653bcdef806336190427e63d35f3fef2002e2 1 parent 7ae3f7e
@shime shime authored
View
4 lib/airbrake.rb
@@ -29,6 +29,8 @@ module Airbrake
}
+ # Queue used to send async notices. Used only if configuration.async is
+ # set to true.
AIRBRAKE_QUEUE = GirlFriday::WorkQueue.new(nil,:size => 3) do |notice|
sender.send_to_airbrake(notice.to_xml)
end
@@ -137,7 +139,7 @@ def build_lookup_hash_for(exception, options = {})
def send_notice(notice)
if configuration.public?
- if configuration.async
+ if configuration.async?
AIRBRAKE_QUEUE << notice
else
sender.send_to_airbrake(notice.to_xml)
View
1  lib/airbrake/configuration.rb
@@ -135,6 +135,7 @@ class Configuration
alias_method :secure?, :secure
alias_method :use_system_ssl_cert_chain?, :use_system_ssl_cert_chain
+ alias_method :async?, :async
def initialize
@secure = false
View
2  test/notifier_test.rb
@@ -157,7 +157,7 @@ def set_development_env
config_opts = { 'one' => 'two', 'three' => 'four' }
notice = stub_notice!
stub_sender!
- Airbrake.configuration = stub('config', :merge => config_opts, :public? => true)
+ Airbrake.configuration = stub('config', :merge => config_opts, :public? => true,:async? => nil)
Airbrake.notify(exception)
Please sign in to comment.
Something went wrong with that request. Please try again.