Skip to content

Commit

Permalink
Set timeout of HTTPClient with 5 minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
jiikko committed Oct 29, 2020
1 parent 461f27b commit 3213e0e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/deploygate/api/v1/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ def post(path, params, &process_block)
private

def client
HTTPClient.new(:agent_name => "dg/#{DeployGate::VERSION}")
timeout = 60 * 5 # 5 minutes
HTTPClient.new(agent_name: "dg/#{DeployGate::VERSION}").tap do |c|
c.receive_timeout = timeout
c.send_timeout = timeout
end
end

def headers
Expand Down

0 comments on commit 3213e0e

Please sign in to comment.