Skip to content

Commit

Permalink
fix: Return http health checking
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramimashkouk committed Nov 29, 2024
1 parent ba5b4a9 commit b62d9dd
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions backend/chatsky_ui/services/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,17 @@ async def check_telegram_readiness(stream, name):
return True
return False

# async with AsyncClient() as client:
# try:
# response = await client.get(
# f"http://localhost:{HTTP_INTERFACE_PORT}/health",
# )
# return response.json()["status"] == "ok"
# except Exception as e:
# self.logger.info(
# f"Process '{self.id}' isn't alive on port '{HTTP_INTERFACE_PORT}'. "
# f"Ignore this if you're not connecting via HTTPInterface. Exception caught: {e}"
# )
async with AsyncClient() as client:
try:
response = await client.get(
f"http://localhost:{HTTP_INTERFACE_PORT}/health",
)
return response.json()["status"] == "ok"
except Exception as e:
self.logger.info(
f"Process '{self.id}' isn't alive on port '{HTTP_INTERFACE_PORT}'. "
f"Ignore this if you're not connecting via HTTPInterface. Exception caught: {e}"
)

done, pending = await asyncio.wait(
[
Expand Down

0 comments on commit b62d9dd

Please sign in to comment.