Class: SuperPoller::AggregatingErrorLogger

Inherits:
Object
  • Object
show all
Defined in:
lib/super_poller/aggregating_error_logger.rb

Instance Method Summary collapse

Constructor Details

#initialize(stats_file, queue) ⇒ AggregatingErrorLogger

Returns a new instance of AggregatingErrorLogger.



2
3
4
# File 'lib/super_poller/aggregating_error_logger.rb', line 2

def initialize(stats_file, queue)
  @stats_file, @queue = stats_file, queue
end

Instance Method Details

#call(error, failed_message) ⇒ Object



6
7
8
9
# File 'lib/super_poller/aggregating_error_logger.rb', line 6

def call(error, failed_message)
  update_error_queue(error, failed_message)
  update_error_stats(error, failed_message[:name] || :unknown)
end