mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
fix connection leak in global_spend_refresh
This commit is contained in:
parent
fa8c2fbf7b
commit
afe37f8f1f
1 changed files with 4 additions and 1 deletions
|
|
@ -2399,7 +2399,10 @@ async def global_spend_refresh():
|
|||
},
|
||||
)
|
||||
await new_client.db.connect()
|
||||
await new_client.db.query_raw(sql_query)
|
||||
try:
|
||||
await new_client.db.query_raw(sql_query)
|
||||
finally:
|
||||
await new_client.db.disconnect()
|
||||
verbose_proxy_logger.info("MonthlyGlobalSpend view refreshed")
|
||||
return {
|
||||
"message": "MonthlyGlobalSpend view refreshed",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue