Fix: Remove duplicate code block causing IndentationError in process_packages_breakdown

This commit is contained in:
kim
2026-01-29 18:19:59 +08:00
parent 0e2acd85b0
commit 587a005665
+5 -12
View File
@@ -603,18 +603,12 @@ def process_packages_breakdown(packages):
try:
amount = int(float(available))
except ValueError:
print(f"Error converting available amount '{available}' to int for {model_name}")
print(
f"Error converting available amount '{available}' to int for {model_name}"
)
amount = 0
model_counts[model_name] = model_counts.get(model_name, 0) + amount
except Exception as e:
print(f"Error processing package: {e}")
continue
# Aggregate balances
model_counts[model_name] = model_counts.get(model_name, 0) + int(
available
)
except Exception as e:
print(f"Error processing package: {e}")
@@ -798,7 +792,7 @@ def active_monitor_loop():
# Use normalized key for storage
# Format: limit:dynamic:volcengine:remaining:{model_name}
dynamic_key = f"limit:dynamic:volcengine:remaining:{target}"
if DEBUG_MODE:
print(
f"DEBUG: Checking {target} (Configured) (Bal: {int(balance)}, Rem: {int(remaining)})",
@@ -818,7 +812,6 @@ def active_monitor_loop():
if remaining < temp_min_remaining:
temp_min_remaining = remaining
global_min_remaining = temp_min_remaining if model_balances else 0
last_usage_map["global"] = current_usage_global
last_sync_time = now