Class: EventMeter::Processor

Inherits:
Object
  • Object
show all
Defined in:
lib/event_meter/processor.rb

Defined Under Namespace

Classes: Batch, Result

Constant Summary collapse

ROLLUP_BUCKETS =
%i[minute hour].freeze

Instance Method Summary collapse

Constructor Details

#initialize(configuration:, report_definition:, stream_storage:, rollup_storage:) ⇒ Processor

Returns a new instance of Processor.



64
65
66
67
68
69
# File 'lib/event_meter/processor.rb', line 64

def initialize(configuration:, report_definition:, stream_storage:, rollup_storage:)
  @configuration = configuration
  @report_definition = report_definition
  @stream_storage = stream_storage
  @rollup_storage = rollup_storage_for(report_definition, rollup_storage)
end

Instance Method Details

#processObject



71
72
73
74
75
# File 'lib/event_meter/processor.rb', line 71

def process
  with_stream_lock do
    process_with_rollup_lock
  end
end