Class: Consumer::Controls::Consumer::Incrementing

Inherits:
Object
  • Object
show all
Includes:
Consumer, Log::Dependency
Defined in:
lib/consumer/controls/consumer/incrementing.rb

Instance Method Summary collapse

Methods included from Consumer

#add_handler, #call, #error_raised, #identifier, included, #position_update_interval, #start, #update_position

Instance Method Details

#configure(session: nil, batch_size: nil, position_store: nil) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/consumer/controls/consumer/incrementing.rb', line 16

def configure(session: nil, batch_size: nil, position_store: nil)
  sleep_duration = ENV['SLEEP_DURATION'] || 100
  sleep_duration = sleep_duration.to_i

  Get::Incrementing.configure(self, sleep_duration)

  PositionStore::LocalFile.configure(self, position_store: position_store)
end