class RedisBatchPush::Monitor

Public Class Methods

new(getter, processor) click to toggle source
# File lib/redis_batch_push/monitor.rb, line 4
def initialize getter, processor
  @getter = getter
  @processor = processor
end

Public Instance Methods

run() click to toggle source
# File lib/redis_batch_push/monitor.rb, line 9
def run
  @getter.restore_backups

  loop do
    if item = @getter.get_next_item
      @processor.process item
    else
      @processor.tick
    end
  end
end