Class: Sqreen::Kit::Signals::BatchCollector::ProcessingLoop
- Inherits:
-
Object
- Object
- Sqreen::Kit::Signals::BatchCollector::ProcessingLoop
- Includes:
- Loggable
- Defined in:
- lib/sqreen/kit/signals/batch_collector.rb
Instance Method Summary collapse
- #flush_size ⇒ Object
-
#initialize(collector) ⇒ ProcessingLoop
constructor
A new instance of ProcessingLoop.
- #max_batch_size ⇒ Object
- #queue ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(collector) ⇒ ProcessingLoop
Returns a new instance of ProcessingLoop.
66 67 68 69 70 |
# File 'lib/sqreen/kit/signals/batch_collector.rb', line 66 def initialize(collector) @collector = collector @next_batch = [] @deadline = nil end |
Instance Method Details
#flush_size ⇒ Object
80 81 82 |
# File 'lib/sqreen/kit/signals/batch_collector.rb', line 80 def flush_size @collector.flush_size end |
#max_batch_size ⇒ Object
76 77 78 |
# File 'lib/sqreen/kit/signals/batch_collector.rb', line 76 def max_batch_size @collector.max_batch_size end |
#queue ⇒ Object
72 73 74 |
# File 'lib/sqreen/kit/signals/batch_collector.rb', line 72 def queue @collector.queue end |
#run ⇒ Object
84 85 86 87 |
# File 'lib/sqreen/kit/signals/batch_collector.rb', line 84 def run while run_loop_once; end logger.info 'Collector thread exiting' end |