diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-10 15:09:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-10 15:09:36 +0300 |
commit | 948023c9c900344aa1e2f334bcaae5a194873b0d (patch) | |
tree | 846c5dbcec70436bca337d970bd11082f91eeb66 /app/models/clusters | |
parent | f42c4be1c0d5247fac0c059ec41c9a1961485aed (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/clusters')
-rw-r--r-- | app/models/clusters/integrations/prometheus.rb | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/app/models/clusters/integrations/prometheus.rb b/app/models/clusters/integrations/prometheus.rb index 8b21fa351a3..0d6177beae7 100644 --- a/app/models/clusters/integrations/prometheus.rb +++ b/app/models/clusters/integrations/prometheus.rb @@ -55,13 +55,23 @@ module Clusters private def activate_project_integrations - ::Clusters::Applications::ActivateServiceWorker - .perform_async(cluster_id, ::Integrations::Prometheus.to_param) + if Feature.enabled?(:rename_integrations_workers) + ::Clusters::Applications::ActivateIntegrationWorker + .perform_async(cluster_id, ::Integrations::Prometheus.to_param) + else + ::Clusters::Applications::ActivateServiceWorker + .perform_async(cluster_id, ::Integrations::Prometheus.to_param) + end end def deactivate_project_integrations - ::Clusters::Applications::DeactivateServiceWorker - .perform_async(cluster_id, ::Integrations::Prometheus.to_param) + if Feature.enabled?(:rename_integrations_workers) + ::Clusters::Applications::DeactivateIntegrationWorker + .perform_async(cluster_id, ::Integrations::Prometheus.to_param) + else + ::Clusters::Applications::DeactivateServiceWorker + .perform_async(cluster_id, ::Integrations::Prometheus.to_param) + end end end end |