Sha256: cada20c808927378e87fbcf4f4cce041b2ed91939d0e2e5f259606e760064355
Contents?: true
Size: 950 Bytes
Versions: 9
Compression:
Stored size: 950 Bytes
Contents
# frozen_string_literal: true module Karafka module Web module Management module Migrations # Since we have introduced notion of pause listeners, we need to reflect this in the # UI, so the scaling changes are visible class SplitListenersIntoActiveAndPausedInStates < Base self.versions_until = '1.2.2' self.type = :consumers_state # @param state [Hash] def migrate(state) listeners = if state[:stats].key?(:listeners) state[:stats][:listeners].to_i elsif state[:stats].key?(:listeners_count) state[:stats][:listeners_count].to_i else 0 end state[:stats][:listeners] = { active: listeners, standby: 0 } end end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems