update: replace deprecated function

This commit is contained in:
Tony Yang
2023-05-03 15:33:56 +08:00
parent 38c0d428c4
commit c6806d525d

View File

@@ -177,7 +177,8 @@ def handler(loop, context):
loop.stop()
# run
loop = asyncio.get_event_loop()
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop=loop)
loop.set_exception_handler(handler)
loop.create_task(main(loop))