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
Class Method Summary collapse
-
.deliver(url, body, configuration, options = {}) ⇒ Object
Queues a given payload to be delivered asynchronously.
Class Method Details
.deliver(url, body, configuration, options = {}) ⇒ Object
Queues a given payload to be delivered asynchronously.
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/bugsnag/delivery/thread_queue.rb', line 13 def deliver(url, body, configuration, ={}) @configuration = configuration start_once! if @queue.length > MAX_OUTSTANDING_REQUESTS @configuration.warn("Dropping notification, #{@queue.length} outstanding requests") return end # Add delivery to the worker thread @queue.push proc { super(url, body, configuration, ) } end |