Sha256: c4678c5961ca460a04beb17776032bcfdd54d29ca33cc42e00f751fa67443c87

Contents?: true

Size: 678 Bytes

Versions: 7

Compression:

Stored size: 678 Bytes

Contents

# frozen_string_literal: true

module Karafka
  module Web
    module Management
      module Migrations
        module ConsumersMetrics
          # Introduce waiting in consumers metrics to complement busy and enqueued for jobs metrics
          class IntroduceWaiting < Base
            self.versions_until = '1.1.1'
            self.type = :consumers_metrics

            # @param state [Hash]
            def migrate(state)
              state[:aggregated].each_value do |metrics|
                metrics.each do |metric|
                  metric.last[:waiting] = 0
                end
              end
            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_metrics/1700234522_introduce_waiting.rb
karafka-web-0.10.2 lib/karafka/web/management/migrations/consumers_metrics/1700234522_introduce_waiting.rb
karafka-web-0.10.1 lib/karafka/web/management/migrations/consumers_metrics/1700234522_introduce_waiting.rb
karafka-web-0.10.0 lib/karafka/web/management/migrations/consumers_metrics/1700234522_introduce_waiting.rb
karafka-web-0.10.0.rc2 lib/karafka/web/management/migrations/consumers_metrics/1700234522_introduce_waiting.rb
karafka-web-0.10.0.rc1 lib/karafka/web/management/migrations/consumers_metrics/1700234522_introduce_waiting.rb
karafka-web-0.10.0.beta1 lib/karafka/web/management/migrations/consumers_metrics/1700234522_introduce_waiting.rb