From 20897ebc7afe498c7a521dbe9f9c197ee63d346b Mon Sep 17 00:00:00 2001 From: Dylan Griffith Date: Sun, 25 Feb 2018 12:45:26 +1100 Subject: [PATCH] Increase lease timeout for CheckIngressIpAddressService to reduce polling frequency (#42643) --- .../clusters/applications/check_ingress_ip_address_service.rb | 2 +- .../applications/check_ingress_ip_address_service_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/clusters/applications/check_ingress_ip_address_service.rb b/app/services/clusters/applications/check_ingress_ip_address_service.rb index a98e05b25cb..e572b1e5d99 100644 --- a/app/services/clusters/applications/check_ingress_ip_address_service.rb +++ b/app/services/clusters/applications/check_ingress_ip_address_service.rb @@ -5,7 +5,7 @@ module Clusters Error = Class.new(StandardError) - LEASE_TIMEOUT = 3.seconds.to_i + LEASE_TIMEOUT = 15.seconds.to_i def execute return if app.external_ip diff --git a/spec/services/clusters/applications/check_ingress_ip_address_service_spec.rb b/spec/services/clusters/applications/check_ingress_ip_address_service_spec.rb index e14c82d32d4..bf038595a4d 100644 --- a/spec/services/clusters/applications/check_ingress_ip_address_service_spec.rb +++ b/spec/services/clusters/applications/check_ingress_ip_address_service_spec.rb @@ -25,7 +25,7 @@ describe Clusters::Applications::CheckIngressIpAddressService do allow(application.cluster).to receive(:kubeclient).and_return(kubeclient) allow(Gitlab::ExclusiveLease) .to receive(:new) - .with("check_ingress_ip_address_service:#{application.id}", timeout: 3.seconds.to_i) + .with("check_ingress_ip_address_service:#{application.id}", timeout: 15.seconds.to_i) .and_return(exclusive_lease) end