Enhance: Format balance logs with thousands separators and add bilingual (CN/EN) descriptions
This commit is contained in:
+5
-5
@@ -604,7 +604,7 @@ def process_packages_breakdown(packages):
|
||||
or "glm" in str(target_models)
|
||||
):
|
||||
print(
|
||||
f"DEBUG: Pkg Raw='{target_raw}' -> Norm='{norm_result}', Avail={available}",
|
||||
f"DEBUG: Pkg Raw='{target_raw}' -> Norm='{norm_result}', Avail={int(float(available)):,}",
|
||||
flush=True,
|
||||
)
|
||||
|
||||
@@ -783,7 +783,7 @@ def active_monitor_loop():
|
||||
for model_name, balance in model_balances.items():
|
||||
remaining = balance - BUFFER
|
||||
print(
|
||||
f"DEBUG: Checking {model_name} (Bal: {balance}, Rem: {remaining})",
|
||||
f"DEBUG: Checking {model_name} (Bal: {int(balance):,}, Rem: {int(remaining):,})",
|
||||
flush=True,
|
||||
)
|
||||
|
||||
@@ -797,7 +797,7 @@ def active_monitor_loop():
|
||||
if target not in INTERESTED_MODELS:
|
||||
if DEBUG_MODE:
|
||||
print(
|
||||
f"DEBUG: Skipping {target} (Not in INTERESTED_MODELS)",
|
||||
f"DEBUG: Skipping {target} (Not in INTERESTED_MODELS / 未在白名单)",
|
||||
flush=True,
|
||||
)
|
||||
continue
|
||||
@@ -808,7 +808,7 @@ def active_monitor_loop():
|
||||
|
||||
if DEBUG_MODE:
|
||||
print(
|
||||
f"DEBUG: Checking {target} (Configured) (Bal: {int(balance)}, Rem: {int(remaining)})",
|
||||
f"DEBUG: Checking {target} (Configured / 已配置) (Bal: {int(balance):,}, Rem: {int(remaining):,})",
|
||||
flush=True,
|
||||
)
|
||||
|
||||
@@ -816,7 +816,7 @@ def active_monitor_loop():
|
||||
redis_client.setex(dynamic_key, 86400, int(remaining))
|
||||
if DEBUG_MODE:
|
||||
print(
|
||||
f"DEBUG: Set Redis {dynamic_key} = {int(remaining)}",
|
||||
f"DEBUG: Set Redis {dynamic_key} = {int(remaining):,}",
|
||||
flush=True,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user