Skip to content

Commit dff3c33

Browse files
committed
fix: mark validator-future exception as retrieved to silence GC warning
1 parent 4d39c35 commit dff3c33

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

runware/validate.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ async def _get_validator(
8989
except Exception as exc:
9090
future.set_exception(exc)
9191
_validator_cache.pop(model, None)
92+
# Mark the exception as retrieved so asyncio's GC doesn't log
93+
# "Future exception was never retrieved" when there are no waiters.
94+
_ = future.exception()
9295
raise
9396

9497

0 commit comments

Comments
 (0)