summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2018-02-25 12:46:16 +1100
committerDylan Griffith <dyl.griffith@gmail.com>2018-02-25 12:50:03 +1100
commit233cf07083faabcc11b2fa8de04123156d712efb (patch)
tree576ce97ca187c18f685c9c28a2551598646b718f /app/models
parent20897ebc7afe498c7a521dbe9f9c197ee63d346b (diff)
downloadgitlab-ce-233cf07083faabcc11b2fa8de04123156d712efb.tar.gz
Remove redundant code and increase delay for ClusterWaitForIngressIpAddressWorker (#42643)
Diffstat (limited to 'app/models')
-rw-r--r--app/models/clusters/applications/ingress.rb7
1 files changed, 3 insertions, 4 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