Background tasks cancelled #1913
-
Hi there, Anyway I'am experimenting a similar issue. I run running a starlette background task from a FastAPI/Strawberry server, something like: info.context["background_tasks"].add_task(
my_task, *my_args
) The background task performs some AIOHTTP requests on other servers (and it is quite slow in fact). The wrapping client of AIOHTTP is NIO which I actually use in the background task. When executing the function inside the request I have no issues, but when calling it as a bg task I receive the famigerous 'asyncio.exceptions.CancelledError'. I've also tried upgrading Starlette to the latest version. Any clues on that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This was fixed in Starlette 0.21.0. |
Beta Was this translation helpful? Give feedback.
This was fixed in Starlette 0.21.0.