Class: Clusters::Applications::ActivateServiceWorker
- Inherits:
-
Object
- Object
- Clusters::Applications::ActivateServiceWorker
- Includes:
- ApplicationWorker, ClusterQueue
- Defined in:
- app/workers/clusters/applications/activate_service_worker.rb
Overview
rubocop:disable Scalability/IdempotentWorker
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
Methods included from WorkerContext
Instance Method Details
#perform(cluster_id, service_name) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'app/workers/clusters/applications/activate_service_worker.rb', line 11 def perform(cluster_id, service_name) cluster = Clusters::Cluster.find_by_id(cluster_id) return unless cluster cluster.all_projects.find_each do |project| project.find_or_initialize_service(service_name).update!(active: true) end end |