Class: SolidQueueGuard::Checks::Config::TopologyRecommendationCheck

Inherits:
Base
  • Object
show all
Defined in:
lib/solid_queue_guard/checks/config/topology_recommendation_check.rb

Instance Method Summary collapse

Methods inherited from Base

call, #initialize

Constructor Details

This class inherits a constructor from SolidQueueGuard::Checks::Base

Instance Method Details

#callObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/solid_queue_guard/checks/config/topology_recommendation_check.rb', line 7

def call
  recommendations = Recommendations::Topology.analyze

  if recommendations.empty?
    pass('topology_recommendation', 'No queue.yml topology changes recommended')
  else
    warn(
      'topology_recommendation',
      recommendations.join('; '),
      suggestion: 'Review config/queue.yml worker and database pool settings',
      metadata: { recommendations: recommendations }
    )
  end
end