feat: default timeout 120 -> 600

This commit is contained in:
莘权 马 2024-08-27 14:59:28 +08:00
parent 16e7617959
commit aae2bfe1fa

View file

@ -259,11 +259,11 @@ class Editor(BaseModel):
if not base_url:
return None
api_key = await get_env_default(key="api_key", app_name="OmniParse", default_value="")
timeout = env_timeout or conf_timeout or 120
timeout = env_timeout or conf_timeout or 600
try:
timeout = int(timeout)
except ValueError:
timeout = 120
timeout = 600
try:
if not await check_http_endpoint(url=base_url):