Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[spaceship] increase timeout for web session connect api to 1200 #16676

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions spaceship/lib/spaceship/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spaceship/lib/spaceship/connect_api/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down