chore: restore API request timeout 5s
This commit is contained in:
@@ -26,9 +26,9 @@ INDEX_URL_PATTERN = getattr(config, "ZSGL_INDEX_URL_PATTERN", "index.aspx")
|
||||
COOKIES_DIR = getattr(config, "COOKIES_DIR", "data/cookies")
|
||||
|
||||
try:
|
||||
_API_REQUEST_TIMEOUT_SECONDS = float(os.environ.get("API_REQUEST_TIMEOUT_SECONDS") or os.environ.get("API_REQUEST_TIMEOUT") or "15")
|
||||
_API_REQUEST_TIMEOUT_SECONDS = float(os.environ.get("API_REQUEST_TIMEOUT_SECONDS") or os.environ.get("API_REQUEST_TIMEOUT") or "5")
|
||||
except Exception:
|
||||
_API_REQUEST_TIMEOUT_SECONDS = 15.0
|
||||
_API_REQUEST_TIMEOUT_SECONDS = 5.0
|
||||
_API_REQUEST_TIMEOUT_SECONDS = max(3.0, _API_REQUEST_TIMEOUT_SECONDS)
|
||||
|
||||
_cookie_domain_fallback = urlsplit(BASE_URL).hostname or "postoa.aidunsoft.com"
|
||||
|
||||
Reference in New Issue
Block a user