Skip to content

Commit 5fdca56

Browse files
authored
Merge pull request #14 from taskiq-python/feature/log-fix
2 parents 53069ce + 4044a74 commit 5fdca56

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

taskiq_dependencies/ctx.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ def close(self, *args: Any) -> None: # noqa: C901
142142
if exception_found:
143143
try:
144144
dep.throw(*args)
145+
except StopIteration:
146+
continue
145147
except BaseException as exc:
146148
logger.warning(
147149
"Exception found on dependency teardown %s",
@@ -243,6 +245,8 @@ async def close(self, *args: Any) -> None: # noqa: C901
243245
if exception_found:
244246
try:
245247
dep.throw(*args)
248+
except StopIteration:
249+
continue
246250
except BaseException as exc:
247251
logger.warning(
248252
"Exception found on dependency teardown %s",
@@ -257,6 +261,8 @@ async def close(self, *args: Any) -> None: # noqa: C901
257261
if exception_found:
258262
try:
259263
await dep.athrow(*args)
264+
except StopAsyncIteration:
265+
continue
260266
except BaseException as exc:
261267
logger.warning(
262268
"Exception found on dependency teardown %s",

0 commit comments

Comments
 (0)