Skip to content

Commit

Permalink
πŸ› Fix healthcheck in api-server (#6662)
Browse files Browse the repository at this point in the history
  • Loading branch information
bisgaard-itis authored Nov 15, 2024
1 parent cb74ff7 commit d3e12a3
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ async def teardown(self):

@property
def healthy(self) -> bool:
return self._health_check_failure_count <= self._allowed_health_check_failures
return self._rabbit_client.healthy and (
self._health_check_failure_count <= self._allowed_health_check_failures
) # https://github.com/ITISFoundation/osparc-simcore/pull/6662

@property
def health_check_failure_count(self) -> NonNegativeInt:
Expand All @@ -82,9 +84,6 @@ async def _background_task_method(self):
while self._dummy_queue.qsize() > 0:
_ = self._dummy_queue.get_nowait()
try:
if not self._rabbit_client.healthy:
self._increment_health_check_failure_count()
return
await asyncio.wait_for(
self._rabbit_client.publish(
self._dummy_message.channel_name, self._dummy_message
Expand Down

0 comments on commit d3e12a3

Please sign in to comment.