Sha256: 68d64494ac376dd22100058a58f3b4a86d68f8641acfd2af0893cf64b0ad729d

Contents?: true

Size: 597 Bytes

Versions: 7

Compression:

Stored size: 597 Bytes

Contents

# frozen_string_literal: true

module Karafka
  module Web
    module Management
      module Migrations
        module ConsumersStates
          # Renames total lag to hybrid to better represent what it is
          class RenameLagTotalToLagHybrid < Base
            self.versions_until = '1.3.1'
            self.type = :consumers_states

            # @param state [Hash]
            def migrate(state)
              state[:stats][:lag_hybrid] = state[:stats][:lag_total] || 0
              state[:stats].delete(:lag_total)
            end
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
karafka-web-0.10.3 lib/karafka/web/management/migrations/consumers_states/1706611396_rename_lag_total_to_lag_hybrid.rb
karafka-web-0.10.2 lib/karafka/web/management/migrations/consumers_states/1706611396_rename_lag_total_to_lag_hybrid.rb
karafka-web-0.10.1 lib/karafka/web/management/migrations/consumers_states/1706611396_rename_lag_total_to_lag_hybrid.rb
karafka-web-0.10.0 lib/karafka/web/management/migrations/consumers_states/1706611396_rename_lag_total_to_lag_hybrid.rb
karafka-web-0.10.0.rc2 lib/karafka/web/management/migrations/consumers_states/1706611396_rename_lag_total_to_lag_hybrid.rb
karafka-web-0.10.0.rc1 lib/karafka/web/management/migrations/consumers_states/1706611396_rename_lag_total_to_lag_hybrid.rb
karafka-web-0.10.0.beta1 lib/karafka/web/management/migrations/consumers_states/1706611396_rename_lag_total_to_lag_hybrid.rb