Sha256: b5340fe6ae914893cb64eec6dbaf4057a998d4f0453264ee3c65f330e872533f

Contents?: true

Size: 625 Bytes

Versions: 8

Compression:

Stored size: 625 Bytes

Contents

# frozen_string_literal: true

module Karafka
  module Web
    module Management
      module Migrations
        module ConsumersStates
          # Moves to using lag total as a normalization for both lags
          class IntroduceLagTotal < Base
            self.versions_until = '1.3.0'
            self.type = :consumers_states

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
karafka-web-0.10.4 lib/karafka/web/management/migrations/consumers_states/1706607960_introduce_lag_total.rb
karafka-web-0.10.3 lib/karafka/web/management/migrations/consumers_states/1706607960_introduce_lag_total.rb
karafka-web-0.10.2 lib/karafka/web/management/migrations/consumers_states/1706607960_introduce_lag_total.rb
karafka-web-0.10.1 lib/karafka/web/management/migrations/consumers_states/1706607960_introduce_lag_total.rb
karafka-web-0.10.0 lib/karafka/web/management/migrations/consumers_states/1706607960_introduce_lag_total.rb
karafka-web-0.10.0.rc2 lib/karafka/web/management/migrations/consumers_states/1706607960_introduce_lag_total.rb
karafka-web-0.10.0.rc1 lib/karafka/web/management/migrations/consumers_states/1706607960_introduce_lag_total.rb
karafka-web-0.10.0.beta1 lib/karafka/web/management/migrations/consumers_states/1706607960_introduce_lag_total.rb