From 3e386ed86f3b2a44e0a84037ab723ad92aa4ff21 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 30 Jun 2026 11:53:33 +0800 Subject: [PATCH] =?UTF-8?q?debug:=20backend=5Faccounting=20=E5=8A=A0=20inf?= =?UTF-8?q?o=20=E7=BA=A7=E5=88=AB=E6=97=A5=E5=BF=97=E8=BF=BD=E8=B8=AA?= =?UTF-8?q?=E8=AE=B0=E8=B4=A6=E5=BE=AA=E7=8E=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - info 替代 debug 确保启动日志必定输出 - 每轮循环后打印 got N records - exception 消息加前缀便于搜索 用于排查 receive 1166 条记录但循环不处理的根因 --- llmage/accounting.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/llmage/accounting.py b/llmage/accounting.py index 218dca6..823bb97 100644 --- a/llmage/accounting.py +++ b/llmage/accounting.py @@ -2,7 +2,7 @@ import asyncio import json import time from datetime import datetime, timedelta -from appPublic.log import exception, debug +from appPublic.log import exception, debug, info from appPublic.uniqueID import getID from appPublic.dictObject import DictObject from sqlor.dbpools import get_sor_context @@ -327,13 +327,14 @@ order by failed_time desc limit {page_size} offset {offset}""" async def backend_accounting(): env = ServerEnv() - debug(f'backend accounting started ...') + info(f"backend accounting started ...") last_backup_date = None while True: try: lus = await get_accounting_llmusages() + info(f"accounting loop: got {len(lus)} records") except Exception as e: - exception(f'{e}') + exception(f"get_accounting_llmusages failed: {e}") lus = [] for lu in lus: try: