Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API] Fix Background Tasks Being Cancelled Prematurely #2618

Merged
merged 2 commits into from
Nov 22, 2022

Conversation

quaark
Copy link
Member

@quaark quaark commented Nov 22, 2022

In the current fastapi version, there is a bug in the starlette package it uses for the background tasks. The bug causes the task to be cancelled if the client's http connection is closed before the task is done. The bug is fixed in the latest version of starlette & fastapi. We will upgrade in 1.3.0, but until then we will use this workaround to prevent the task from being cancelled all together. See encode/starlette#1438 and tiangolo/fastapi#5606

@quaark quaark merged commit 9c1b8c5 into mlrun:development Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant