mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
build: build fixes
This commit is contained in:
parent
9d5de2f3ad
commit
4879265d7f
4 changed files with 18 additions and 8 deletions
|
@ -1870,7 +1870,9 @@ async def update_spend(
|
|||
if len(prisma_client.user_list_transactons.keys()) > 0:
|
||||
for i in range(n_retry_times + 1):
|
||||
try:
|
||||
async with prisma_client.db.tx(timeout=6000) as transaction:
|
||||
async with prisma_client.db.tx(
|
||||
timeout=timedelta(seconds=60)
|
||||
) as transaction:
|
||||
async with transaction.batch_() as batcher:
|
||||
for (
|
||||
user_id,
|
||||
|
@ -1895,7 +1897,9 @@ async def update_spend(
|
|||
if len(prisma_client.end_user_list_transactons.keys()) > 0:
|
||||
for i in range(n_retry_times + 1):
|
||||
try:
|
||||
async with prisma_client.db.tx(timeout=6000) as transaction:
|
||||
async with prisma_client.db.tx(
|
||||
timeout=timedelta(seconds=60)
|
||||
) as transaction:
|
||||
async with transaction.batch_() as batcher:
|
||||
for (
|
||||
end_user_id,
|
||||
|
@ -1926,7 +1930,9 @@ async def update_spend(
|
|||
if len(prisma_client.key_list_transactons.keys()) > 0:
|
||||
for i in range(n_retry_times + 1):
|
||||
try:
|
||||
async with prisma_client.db.tx(timeout=6000) as transaction:
|
||||
async with prisma_client.db.tx(
|
||||
timeout=timedelta(seconds=60)
|
||||
) as transaction:
|
||||
async with transaction.batch_() as batcher:
|
||||
for (
|
||||
token,
|
||||
|
@ -1951,7 +1957,9 @@ async def update_spend(
|
|||
if len(prisma_client.team_list_transactons.keys()) > 0:
|
||||
for i in range(n_retry_times + 1):
|
||||
try:
|
||||
async with prisma_client.db.tx(timeout=6000) as transaction:
|
||||
async with prisma_client.db.tx(
|
||||
timeout=timedelta(seconds=60)
|
||||
) as transaction:
|
||||
async with transaction.batch_() as batcher:
|
||||
for (
|
||||
team_id,
|
||||
|
@ -1972,8 +1980,6 @@ async def update_spend(
|
|||
except Exception as e:
|
||||
raise e
|
||||
|
||||
### UPDATE SPEND LOGS TABLE ###
|
||||
|
||||
|
||||
async def monitor_spend_list(prisma_client: PrismaClient):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue