Quantcast
Channel: How can I call an async function without await? - Stack Overflow
Viewing all articles
Browse latest Browse all 7

How can I call an async function without await?

$
0
0

I have a controller action in aiohttp application.

async def handler_message(request):    try:        content = await request.json()        perform_message(x,y,z)    except (RuntimeError):        print("error in perform fb message")    finally:        return web.Response(text="Done")

perform_message is async function. Now, when I call action I want that my action return as soon as possible and perform_message put in event loop.

In this way, perform_message isn't executed


Viewing all articles
Browse latest Browse all 7

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>