Replies: 1 comment 7 replies
-
Can you explain what is the issue when you use the first code example in Microdot v2? |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Not sure if this is the right place to ask: apologies in advance if you have to move it somewhere else.
In Microdot v1 the code below works:
but it does not work in v2.
The provided examples suggest using a different approach:
async def main():
server = asyncio.create_task(app.start_server())
# ... do other asynchronous work here ...
# cleanup before ending the application
await server
asyncio.run(main())
the result I want to obtain is that even though a task stops working the remaining keep on running unaffected.
If the v1 solution no longer works, what is the suggested way to obtain the same result in v2?
Beta Was this translation helpful? Give feedback.
All reactions