From eb0ea447aac55320f423bd65127017a9037c2742 Mon Sep 17 00:00:00 2001 From: Nikita Zavadin Date: Mon, 23 Sep 2024 17:37:54 +0200 Subject: [PATCH] Add logs --- src/magic_di/healthcheck.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/magic_di/healthcheck.py b/src/magic_di/healthcheck.py index 29d14de..7849eeb 100644 --- a/src/magic_di/healthcheck.py +++ b/src/magic_di/healthcheck.py @@ -68,10 +68,6 @@ async def ping(self, dependency: PingableProtocol) -> None: dependency_name = dependency.__class__.__name__ self.injector.logger.debug("Pinging dependency %s...", dependency_name) - try: - await dependency.__ping__() - except Exception as exc: - self.injector.logger.exception("Failed to ping dependency %s", dependency_name) - raise exc # noqa: TRY201 - else: - self.injector.logger.debug("Dependency %s is healthy", dependency_name) + await dependency.__ping__() + + self.injector.logger.debug("Dependency %s is healthy", dependency_name)