Browse Source

add timeout

luojunhui 3 months ago
parent
commit
c036d6d957
1 changed files with 1 additions and 0 deletions
  1. 1 0
      applications/functions/get_history_oss_path.py

+ 1 - 0
applications/functions/get_history_oss_path.py

@@ -18,6 +18,7 @@ async def request_for_fission_info(content_id: str) -> Dict:
                 url,
                 url,
                 json={"contentId": content_id},
                 json={"contentId": content_id},
                 headers={"Content-Type": "application/json"},
                 headers={"Content-Type": "application/json"},
+                timeout=5
             ) as response:
             ) as response:
                 response.raise_for_status()
                 response.raise_for_status()
                 return await response.json()
                 return await response.json()