mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
address greptile review feedback (greploop iteration 5)
- Sweep expired tasks before counting active to prevent false 429s Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
cbc0cb5196
commit
de849bff75
1 changed files with 1 additions and 0 deletions
|
|
@ -117,6 +117,7 @@ async def create_scheduled_task(
|
|||
owner_token = _require_token(user_api_key_dict)
|
||||
prisma_client = _get_prisma_client()
|
||||
|
||||
await store.sweep_expired_for_owner(prisma_client, owner_token)
|
||||
active = await store.count_active_for_owner(prisma_client, owner_token)
|
||||
if active >= store.MAX_ACTIVE_TASKS_PER_KEY:
|
||||
raise HTTPException(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue