Skip to content

Commit

Permalink
add stopped flag and async for queue put
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasBack2Future committed Nov 5, 2024
1 parent c5db5dd commit 2fc5766
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion agents/ten_packages/extension/glue_python_async/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ async def on_start(self, ten_env: AsyncTenEnv) -> None:
async def on_stop(self, ten_env: AsyncTenEnv) -> None:
ten_env.log_debug("on_stop")

self.queue.put(None)
self.stopped = True
await self.queue.put(None)
await self._flush()

ten_env.on_stop_done()
Expand Down

0 comments on commit 2fc5766

Please sign in to comment.