Class: Karafka::Web::Management::Migrations::ConsumersStates::IntroduceLagTotal

Inherits:
Base
  • Object
show all
Defined in:
lib/karafka/web/management/migrations/consumers_states/1706607960_introduce_lag_total.rb

Overview

Moves to using lag total as a normalization for both lags

Instance Method Summary collapse

Methods inherited from Base

applicable?, index, migrate, sorted_descendants

Instance Method Details

#migrate(state) ⇒ Object

Parameters:

  • state (Hash)


14
15
16
17
18
# File 'lib/karafka/web/management/migrations/consumers_states/1706607960_introduce_lag_total.rb', line 14

def migrate(state)
  state[:stats][:lag_total] = state[:stats][:lag_stored]
  state[:stats].delete(:lag)
  state[:stats].delete(:lag_stored)
end