diff options
Diffstat (limited to 'app/workers')
| -rw-r--r-- | app/workers/cluster_wait_for_ingress_ip_address_worker.rb | 16 |
1 files changed, 2 insertions, 14 deletions
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 0fbb9fb2526..72b3c8b49e0 100644 --- a/app/workers/cluster_wait_for_ingress_ip_address_worker.rb +++ b/app/workers/cluster_wait_for_ingress_ip_address_worker.rb @@ -3,23 +3,11 @@ class ClusterWaitForIngressIpAddressWorker include ClusterQueue include ClusterApplications - INTERVAL = 10.seconds + INTERVAL = 30.seconds def perform(app_name, app_id, retries_remaining) find_application(app_name, app_id) do |app| - result = Clusters::Applications::CheckIngressIpAddressService.new(app).execute - retry_if_necessary(app_name, app_id, retries_remaining) unless result - end - rescue Clusters::Applications::CheckIngressIpAddressService::Error => e - retry_if_necessary(app_name, app_id, retries_remaining) - raise e - end - - private - - def retry_if_necessary(app_name, app_id, retries_remaining) - if retries_remaining > 0 - self.class.perform_in(INTERVAL, app_name, app_id, retries_remaining - 1) + Clusters::Applications::CheckIngressIpAddressService.new(app).execute end end end |
