This commit is contained in:
yumoqing 2026-04-05 15:43:20 +08:00
parent e025d25017
commit 03a1a1be6c

View File

@ -190,10 +190,17 @@ async def backend_accounting():
env = ServerEnv()
debug(f'backend accounting started ...')
while True:
try:
lus = await get_accounting_llmusages()
debug(f'get accounting {len(lus)} lus')
except Exception as e:
exception(f'{e}')
for lu in lus:
try:
debug(f'backend_accounting(): {lu.id=} handleing...')
await llm_accounting(lu)
except Exception as e:
exception(f'{e}, {lu.id=}')
await asyncio.sleep(10)