Skip to content

Commit

Permalink
Merge pull request #19683 from agrare/fix_starting_metrics_collector_…
Browse files Browse the repository at this point in the history
…workers

Don't start every MetricsCollectorWorker
  • Loading branch information
Fryguy authored Jan 3, 2020
2 parents 1135089 + 5cb0e6b commit de8437c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/models/mixins/per_ems_type_worker_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ module PerEmsTypeWorkerMixin

included do
self.check_for_minimal_role = false
@workers = lambda do
return 0 unless self.any_valid_ems_in_zone?
workers_configured_count
end
end

module ClassMethods
def workers
return 0 unless any_valid_ems_in_zone?

super
end

def ems_class
parent
end
Expand Down

0 comments on commit de8437c

Please sign in to comment.