From ef74b9fdda4587421a5f5bdfa81cbbce31b8c530 Mon Sep 17 00:00:00 2001 From: doctorpangloss <@hiddenswitch.com> Date: Thu, 6 Feb 2025 11:08:09 -0800 Subject: [PATCH] More graceful health check handling of this connection not being ready --- comfy/distributed/distributed_prompt_worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comfy/distributed/distributed_prompt_worker.py b/comfy/distributed/distributed_prompt_worker.py index 88e7b0c6a..974f5f8d6 100644 --- a/comfy/distributed/distributed_prompt_worker.py +++ b/comfy/distributed/distributed_prompt_worker.py @@ -42,7 +42,7 @@ class DistributedPromptWorker: self._health_check_site: Optional[web.TCPSite] = None 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) is_healthy = await self._is_connection_healthy()