I've written a chat app that uses Quart, socketio, and uvicorn, along with some external frameworks like firestore. My dev environment is Replit. In some parts of my app, I get vague warning messages that I interpret as meaning that something is blocking an async function:
WARNING
Executing <Task pending name='Task-32' coro=<AsyncServer._handle_event_internal() running at /home/runner/MyApp/.pythonlibs/lib/python3.11/site-packages/socketio/async_server.py:610> wait_for=<Task pending name='Task-33' coro=<UnaryStreamCall._send_unary_request() running at /home/runner/MyApp/.pythonlibs/lib/python3.11/site-packages/grpc/aio/_call.py:634> cb=[Task.task_wakeup()] created at /home/runner/MyApp/.pythonlibs/lib/python3.11/site-packages/grpc/aio/_call.py:629> cb=[set.discard()] created at /nix/store/f98g7xbckgqbkagdvpzc2r6lv3h1p9ki-python3-3.11.9/lib/python3.11/asyncio/tasks.py:680> took 0.109 seconds
I can find the offending code block by uncommenting code until the warning goes away, but surely there is a better way to identify the offending caller? I'm wondering if there's a deeper problem like some kind of conflict with asyncio and uvicorn? Or am I just expected to wrap a bunch of potentially slow blocks in asyncio.to_thread()?