From 0ad6ae615f2bf76d3231a99b478e221e7dca5cc5 Mon Sep 17 00:00:00 2001 From: Josh Holtz Date: Thu, 25 Jun 2020 07:50:43 -0500 Subject: [PATCH] [spaceship] increase timeout for web session connect api to 1200 --- spaceship/lib/spaceship/client.rb | 6 +++--- spaceship/lib/spaceship/connect_api/client.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spaceship/lib/spaceship/client.rb b/spaceship/lib/spaceship/client.rb index 70744369c31..96de6d1185b 100644 --- a/spaceship/lib/spaceship/client.rb +++ b/spaceship/lib/spaceship/client.rb @@ -194,11 +194,11 @@ def self.client_with_authorization_from(another_client) self.new(cookie: another_client.instance_variable_get(:@cookie), current_team_id: another_client.team_id) end - def initialize(cookie: nil, current_team_id: nil) + def initialize(cookie: nil, current_team_id: nil, timeout: nil) options = { request: { - timeout: (ENV["SPACESHIP_TIMEOUT"] || 300).to_i, - open_timeout: (ENV["SPACESHIP_TIMEOUT"] || 300).to_i + timeout: (ENV["SPACESHIP_TIMEOUT"] || timeout || 300).to_i, + open_timeout: (ENV["SPACESHIP_TIMEOUT"] || timeout || 300).to_i } } @current_team_id = current_team_id diff --git a/spaceship/lib/spaceship/connect_api/client.rb b/spaceship/lib/spaceship/connect_api/client.rb index 45484ce876e..5657afa81b6 100644 --- a/spaceship/lib/spaceship/connect_api/client.rb +++ b/spaceship/lib/spaceship/connect_api/client.rb @@ -13,7 +13,7 @@ class Client < Spaceship::Client # Instantiates a client with cookie session or a JWT token. def initialize(cookie: nil, current_team_id: nil, token: nil) if token.nil? - super(cookie: cookie, current_team_id: current_team_id) + super(cookie: cookie, current_team_id: current_team_id, timeout: 1200) else options = { request: {