Class: Karafka::Web::Management::Migrations::ConsumersStates::RenameLagTotalToLagHybrid
- Inherits:
-
Base
- Object
- Base
- Karafka::Web::Management::Migrations::ConsumersStates::RenameLagTotalToLagHybrid
- Defined in:
- lib/karafka/web/management/migrations/consumers_states/1706611396_rename_lag_total_to_lag_hybrid.rb
Overview
Renames total lag to hybrid to better represent what it is
Instance Method Summary collapse
Methods inherited from Base
applicable?, index, migrate, sorted_descendants
Instance Method Details
#migrate(state) ⇒ Object
14 15 16 17 |
# File 'lib/karafka/web/management/migrations/consumers_states/1706611396_rename_lag_total_to_lag_hybrid.rb', line 14 def migrate(state) state[:stats][:lag_hybrid] = state[:stats][:lag_total] || 0 state[:stats].delete(:lag_total) end |