Add a proper timeout to is_online
Some checks failed
Build and Publish / build_and_publish (push) Has been cancelled

This commit is contained in:
Nexus 2024-06-11 01:44:09 +01:00
parent b6d747a63b
commit d4d550d7ba
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -27,7 +27,7 @@ class ServerConfig(BaseModel):
""" """
Checks that the current server is online and responding to requests. Checks that the current server is online and responding to requests.
""" """
async with httpx.AsyncClient(base_url=str(self.base_url)) as client: async with httpx.AsyncClient(base_url=str(self.base_url), timeout=httpx.Timeout(2.25)) as client:
try: try:
response = await client.get("/api/tags") response = await client.get("/api/tags")
return response.status_code == 200 return response.status_code == 200