Class: Clusters::Applications::CheckPrometheusHealthWorker

Inherits:
Object
  • Object
show all
Includes:
ApplicationWorker, CronjobQueue
Defined in:
app/workers/clusters/applications/check_prometheus_health_worker.rb

Constant Summary

Constants included from ApplicationWorker

ApplicationWorker::LOGGING_EXTRA_KEY

Constants included from WorkerAttributes

WorkerAttributes::NAMESPACE_WEIGHTS, WorkerAttributes::VALID_RESOURCE_BOUNDARIES, WorkerAttributes::VALID_URGENCIES

Instance Method Summary collapse

Methods included from Gitlab::SidekiqVersioning::Worker

#job_version

Methods included from WorkerContext

#with_context

Instance Method Details

#performObject


19
20
21
22
23
24
25
26
27
# File 'app/workers/clusters/applications/check_prometheus_health_worker.rb', line 19

def perform
  demo_project_ids = Gitlab::Monitor::DemoProjects.primary_keys

  clusters = Clusters::Cluster.with_application_prometheus
    .with_project_alert_service_data(demo_project_ids)

  # Move to a seperate worker with scoped context if expanded to do work on customer projects
  clusters.each { |cluster| Clusters::Applications::PrometheusHealthCheckService.new(cluster).execute }
end