fix: fixes event loop handling on windows in dynamic steps example

This commit is contained in:
hajdul88 2025-01-16 18:17:11 +01:00
parent 935763b08d
commit bd6aafe9b7

View file

@ -204,4 +204,9 @@ if __name__ == "__main__":
"retriever": retrieve,
}
asyncio.run(main(steps_to_enable))
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
try:
loop.run_until_complete(main(steps_to_enable))
finally:
loop.run_until_complete(loop.shutdown_asyncgens())