Add a proper timeout to is_online
Some checks failed
Build and Publish / build_and_publish (push) Has been cancelled
Some checks failed
Build and Publish / build_and_publish (push) Has been cancelled
This commit is contained in:
parent
b6d747a63b
commit
d4d550d7ba
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue