Fix destroy for asyncio (#451)
This PR fixes a bug where `DBOS.destroy()` shuts down the executor pool but leaves it attached to the event loop. As a result, if DBOS is re-initialized and async functions are invoked directly, the loop still tries to use the destroyed pool and raises a runtime error. The fix is to let the wrapper functions optionally accept a `dbos` instance. This makes sure the event loop is always configured correctly, even when async workflows are called directly after re-initialization. Added a test for destroy semantics for asyncio.
Q
Qian Li committed
381dc4b1d70e7ccb18fc9725d6db33a733779b93
Parent: cb55431
Committed by GitHub <noreply@github.com>
on 9/3/2025, 10:42:28 PM