#34805 [Bug]: in-memory spend buffers are dropped on proxy shutdown
### Check for existing issues
- [x] I have searched the existing issues and checked that my issue is not a duplicate.
### What happened?
In-memory spend buffers are silently dropped when the proxy shuts down.
`update_spend` (key/team/user/end_user spend) and `update_daily_tag_spend` are apscheduler jobs that accumulate rows in in-memory buffers between intervals. On shutdown:
- the scheduler is never stopped anywhere, so a job can still be mid-flight, and - `proxy_shutdown_event` (litellm/proxy/proxy_server.py) goes straight to `await prisma_client.disconnect()` without flushing either buffer.
Everything not yet committed is lost. On a uvicorn worker recycle (MAX_REQUESTS_BEFORE_RESTART) or any SIGTERM (rolling update, scale-down, liveness kill) this happens on every single restart, because the replacement worker only sees its own future traffic.
Observed symptoms in the recycle window: `ClientNotConnectedError` on update_spend, "Daily tag spend batch upsert failed", and "Error in spend logs queue monitor: Server disconnected without sending a response."
Expected: buffered spend rows are flushed to the DB before Prisma disconnects. Actual: they are discarded.
Note that `…