diff --git a/yapapi/executor/__init__.py b/yapapi/executor/__init__.py index 13b4e721c..302d4d0c0 100644 --- a/yapapi/executor/__init__.py +++ b/yapapi/executor/__init__.py @@ -1113,6 +1113,9 @@ async def worker_starter() -> None: cancelled = True finally: + + await work_queue.close() + # Importing this at the beginning would cause circular dependencies from ..log import pluralize diff --git a/yapapi/executor/_smartq.py b/yapapi/executor/_smartq.py index 0ba96fe53..52e671c07 100644 --- a/yapapi/executor/_smartq.py +++ b/yapapi/executor/_smartq.py @@ -93,6 +93,7 @@ async def close(self): if self._buffer_task: self._buffer_task.cancel() await self._buffer_task + self._buffer_task = None def finished(self): return (