mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-30 00:00:26 +08:00
More graceful health check handling of this connection not being ready
This commit is contained in:
parent
4c72ef5bac
commit
ef74b9fdda
@ -42,7 +42,7 @@ class DistributedPromptWorker:
|
|||||||
self._health_check_site: Optional[web.TCPSite] = None
|
self._health_check_site: Optional[web.TCPSite] = None
|
||||||
|
|
||||||
async def _health_check(self, request):
|
async def _health_check(self, request):
|
||||||
if self._connection is None:
|
if not hasattr(self, "_connection") or self._connection is None:
|
||||||
return web.Response(text="UNHEALTHY: RabbitMQ connection is not established", status=503)
|
return web.Response(text="UNHEALTHY: RabbitMQ connection is not established", status=503)
|
||||||
|
|
||||||
is_healthy = await self._is_connection_healthy()
|
is_healthy = await self._is_connection_healthy()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user