Module: Consumer::PositionStore::Put

Defined in:
lib/consumer/position_store.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.prepended(cls) ⇒ Object



75
76
77
# File 'lib/consumer/position_store.rb', line 75

def self.prepended(cls)
  Virtual::Method.define(cls, :put)
end

Instance Method Details

#put(position) ⇒ Object



79
80
81
82
83
84
85
86
87
88
89
# File 'lib/consumer/position_store.rb', line 79

def put(position)
  logger.trace(tags: [:position_store, :put]) { "Put position (Position: #{position})" }

  super

  logger.info(tags: [:position_store, :put]) { "Put position done (Position: #{position})" }

  telemetry.record(:put, Telemetry::Put.new(position))

  nil
end