mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
test(test_keys.py): add more retries for checking if budget updated
This commit is contained in:
parent
cf5f6ab49c
commit
eea4325e60
2 changed files with 15 additions and 4 deletions
|
@ -1743,7 +1743,10 @@ async def startup_event():
|
|||
|
||||
### START BUDGET SCHEDULER ###
|
||||
scheduler = AsyncIOScheduler()
|
||||
scheduler.add_job(reset_budget, "interval", seconds=10, args=[prisma_client])
|
||||
interval = random.randint(
|
||||
7, 14
|
||||
) # random interval, so multiple workers avoid resetting budget at the same time
|
||||
scheduler.add_job(reset_budget, "interval", seconds=interval, args=[prisma_client])
|
||||
scheduler.start()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue