mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-13 23:11:40 +00:00
store_in_memory_spend_updates_in_redis drained the in-memory queues into local variables before the rpush pipeline. If rpush raised (cloud Redis hiccup, timeout, connection blip), those already-drained transactions were garbage-collected with the scheduler job, silently losing all spend aggregated during that tick. Wrap the rpush in try/except. On failure, re-enqueue the aggregated transactions into their respective in-memory queues so the next scheduler tick retries. Add a unit test that seeds real queues, simulates an rpush failure, and asserts the transactions land back in-memory. |
||
|---|---|---|
| .. | ||
| test_base_update_queue.py | ||
| test_daily_spend_update_queue.py | ||
| test_pod_lock_manager.py | ||
| test_redis_update_buffer.py | ||
| test_spend_update_queue.py | ||
| test_tool_discovery_queue.py | ||