Class: Bugsnag::Delivery::ThreadQueue
- Inherits:
-
Synchronous
- Object
- Synchronous
- Bugsnag::Delivery::ThreadQueue
- Defined in:
- lib/bugsnag/delivery/thread_queue.rb
Constant Summary collapse
- MAX_OUTSTANDING_REQUESTS =
100
- STOP =
Object.new
- MUTEX =
Mutex.new
Constants inherited from Synchronous
Class Method Summary collapse
Class Method Details
.deliver(url, body, configuration) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/bugsnag/delivery/thread_queue.rb', line 11 def deliver(url, body, configuration) start_once! if @queue.length > MAX_OUTSTANDING_REQUESTS Bugsnag.warn("Dropping notification, #{@queue.length} outstanding requests") return end # Add delivery to the worker thread @queue.push proc { super(url, body, configuration) } end |