Work That Runs After the Response

FastAPI's BackgroundTasks runs a function after the answer has gone, so a caller never waits for a confirmation message or a log entry, 202 Accepted says slow work has been taken on, and a job queue such as Celery or RQ is what keeps work safe when it must survive a restart.

By

Updated

Cheat sheet: Work That Runs After the Response
Category
FastAPI
Level
Freelancer
Tags
202 Accepted, Background Tasks, fastapi, Job Queue (python), rest-api