Class: Karafka::Web::Management::Migrations::ConsumersStates::AddJobsCounter
- Inherits:
-
Base
- Object
- Base
- Karafka::Web::Management::Migrations::ConsumersStates::AddJobsCounter
- Defined in:
- lib/karafka/web/management/migrations/consumers_states/1716218393_add_jobs_counter.rb
Overview
Adds the jobs counter matching batches
Instance Method Summary collapse
Methods inherited from Base
applicable?, index, migrate, sorted_descendants
Instance Method Details
#migrate(state) ⇒ Object
14 15 16 17 18 |
# File 'lib/karafka/web/management/migrations/consumers_states/1716218393_add_jobs_counter.rb', line 14 def migrate(state) # If missing we copy-paste from batches as the closest matching value. # Since batch always has a job, this is a good starting point state[:stats][:jobs] = state[:stats][:batches] end |