diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /app/workers/wait_for_cluster_creation_worker.rb | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'app/workers/wait_for_cluster_creation_worker.rb')
-rw-r--r-- | app/workers/wait_for_cluster_creation_worker.rb | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/app/workers/wait_for_cluster_creation_worker.rb b/app/workers/wait_for_cluster_creation_worker.rb index af351c3c207..a34f5386363 100644 --- a/app/workers/wait_for_cluster_creation_worker.rb +++ b/app/workers/wait_for_cluster_creation_worker.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class WaitForClusterCreationWorker # rubocop:disable Scalability/IdempotentWorker +class WaitForClusterCreationWorker include ApplicationWorker data_consistency :always @@ -8,17 +8,7 @@ class WaitForClusterCreationWorker # rubocop:disable Scalability/IdempotentWorke sidekiq_options retry: 3 include ClusterQueue - worker_has_external_dependencies! + idempotent! - def perform(cluster_id) - Clusters::Cluster.find_by_id(cluster_id).try do |cluster| - cluster.provider.try do |provider| - if cluster.gcp? - Clusters::Gcp::VerifyProvisionStatusService.new.execute(provider) - elsif cluster.aws? - Clusters::Aws::VerifyProvisionStatusService.new.execute(provider) - end - end - end - end + def perform(_); end end |