Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/clusters/applications/ingress.rb7
-rw-r--r--app/workers/cluster_wait_for_ingress_ip_address_worker.rb4
2 files changed, 4 insertions, 7 deletions
diff --git a/app/models/clusters/applications/ingress.rb b/app/models/clusters/applications/ingress.rb
index 57ced0f5c44..9f583342c19 100644
--- a/app/models/clusters/applications/ingress.rb
+++ b/app/models/clusters/applications/ingress.rb
@@ -14,13 +14,13 @@ module Clusters
nginx: 1
}
- IP_ADDRESS_FETCH_RETRIES = 3
+ FETCH_IP_ADDRESS_DELAY = 30.seconds
state_machine :status do
before_transition any => [:installed] do |application|
application.run_after_commit do
ClusterWaitForIngressIpAddressWorker.perform_in(
- ClusterWaitForIngressIpAddressWorker::INTERVAL, application.name, application.id, IP_ADDRESS_FETCH_RETRIES)
+ FETCH_IP_ADDRESS_DELAY, application.name, application.id)
end
end
end
@@ -41,8 +41,7 @@ module Clusters
return unless installed?
return if external_ip
- ClusterWaitForIngressIpAddressWorker.perform_async(
- name, id, IP_ADDRESS_FETCH_RETRIES)
+ ClusterWaitForIngressIpAddressWorker.perform_async(name, id)
end
end
end
diff --git a/app/workers/cluster_wait_for_ingress_ip_address_worker.rb b/app/workers/cluster_wait_for_ingress_ip_address_worker.rb
index 72b3c8b49e0..8ba5951750c 100644
--- a/app/workers/cluster_wait_for_ingress_ip_address_worker.rb
+++ b/app/workers/cluster_wait_for_ingress_ip_address_worker.rb
@@ -3,9 +3,7 @@ class ClusterWaitForIngressIpAddressWorker
include ClusterQueue
include ClusterApplications
- INTERVAL = 30.seconds
-
- def perform(app_name, app_id, retries_remaining)
+ def perform(app_name, app_id)
find_application(app_name, app_id) do |app|
Clusters::Applications::CheckIngressIpAddressService.new(app).execute
end