File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
packages/service-library/src/servicelib/redis Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -76,9 +76,6 @@ async def _periodic_check_health() -> None:
7676 name = f"redis_service_health_check_{ self .redis_dsn } __{ uuid4 ()} " ,
7777 )
7878
79- assert self ._health_check_task_started_event # nosec
80- await self ._health_check_task_started_event .wait ()
81-
8279 _logger .info (
8380 "Connection to %s succeeded with %s" ,
8481 f"redis at { self .redis_dsn = } " ,
@@ -90,6 +87,8 @@ async def shutdown(self) -> None:
9087 _logger , level = logging .DEBUG , msg = f"Shutdown RedisClientSDK { self } "
9188 ):
9289 if self ._health_check_task :
90+ assert self ._health_check_task_started_event # nosec
91+ await self ._health_check_task_started_event .wait ()
9392 with suppress (TimeoutError ):
9493 await cancel_wait_task (
9594 self ._health_check_task , max_delay = _HEALTHCHECK_TASK_TIMEOUT_S
You can’t perform that action at this time.
0 commit comments