FastAPI BackgroundTasks: The Smallest Design for Work That Can Wait Until After the Response
FastAPI's BackgroundTasks runs work after the response in the same process. Here's when that's the right call, the scope-leak traps, how to observe it, and when to graduate to a real queue.