The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
get_all_update_transactions_from_redis
Ishaan Jaffe65b708fa2d2
diff --git a/litellm/proxy/db/redis_update_buffer.py b/litellm/proxy/db/redis_update_buffer.pyindex 843ec445a3b..d3591032ff4 100644--- a/litellm/proxy/db/redis_update_buffer.py+++ b/litellm/proxy/db/redis_update_buffer.py@@ -106,5 +106,30 @@ class RedisUpdateBuffer:value=transaction_amount,)- async def get_all_update_transactions_from_redis(self):- pass+ async def get_all_update_transactions_from_redis(+ self,+ ) -> Optional[DBSpendUpdateTransactions]:+ """+ Gets all the update transactions from Redis+ """+ if self.redis_cache is None:+ return None+ expected_keys = [+ "user_list_transactons",+ "end_user_list_transactons",+ "key_list_transactons",+ "team_list_transactons",+ "team_member_list_transactons",+ "org_list_transactons",+ ]+ result = await self.redis_cache.async_batch_get_cache(expected_keys)+ if result is None:+ return None+ return DBSpendUpdateTransactions(+ user_list_transactons=result.get("user_list_transactons", {}),+ end_user_list_transactons=result.get("end_user_list_transactons", {}),+ key_list_transactons=result.get("key_list_transactons", {}),+ team_list_transactons=result.get("team_list_transactons", {}),+ team_member_list_transactons=result.get("team_member_list_transactons", {}),+ org_list_transactons=result.get("org_list_transactons", {}),+ )