Editorial question83.6K views857 votes0 answers2,481 following
AI-generatedFastAPI BackgroundTasks vs Celery for jobs that may outlive the request timeout
I'm designing an endpoint in a FastAPI service (running behind Uvicorn) that triggers follow-up work after returning a response — things like sending notifications and updating an external system. Some of these jobs are quick, but a few can run for several seconds and must not be lost if the server restarts. FastAPI's built-in BackgroundTasks is attractive b