FIX 增加gitea接口的响应时间(timeout设置为100s)
This commit is contained in:
parent
84ad7130d3
commit
97ed641c63
|
@ -82,6 +82,8 @@ class Gitea::ClientService < ApplicationService
|
||||||
req.headers['Content-Type'] = 'application/json'
|
req.headers['Content-Type'] = 'application/json'
|
||||||
req.response :logger # 显示日志
|
req.response :logger # 显示日志
|
||||||
req.adapter Faraday.default_adapter
|
req.adapter Faraday.default_adapter
|
||||||
|
req.options.timeout = 100 # open/read timeout in seconds
|
||||||
|
req.options.open_timeout = 10 # connection open timeout in seconds
|
||||||
if token.blank?
|
if token.blank?
|
||||||
req.basic_auth(username, secret)
|
req.basic_auth(username, secret)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue