Skip to content

[Bug] fastapi background tasks do not work on azure function apps #1782

@alecglen

Description

@alecglen

Expected Behavior

Transferring from Azure-Samples/fastapi-on-azure-functions#33 for visibility.

The function app to return an immediate response while still finishing the background task afterwards.

Actual Behavior

When running the fastapi app directly, the response is returned immediately. But when running through the func.AsgiFunctionApp, the response is not returned until after the background task has completed.

Steps to Reproduce

See example in the linked issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions