Fix: Remove duplicate code block causing IndentationError in process_packages_breakdown
This commit is contained in:
+5
-12
@@ -603,18 +603,12 @@ def process_packages_breakdown(packages):
|
|||||||
try:
|
try:
|
||||||
amount = int(float(available))
|
amount = int(float(available))
|
||||||
except ValueError:
|
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
|
amount = 0
|
||||||
|
|
||||||
model_counts[model_name] = model_counts.get(model_name, 0) + amount
|
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:
|
except Exception as e:
|
||||||
print(f"Error processing package: {e}")
|
print(f"Error processing package: {e}")
|
||||||
@@ -798,7 +792,7 @@ def active_monitor_loop():
|
|||||||
# Use normalized key for storage
|
# Use normalized key for storage
|
||||||
# Format: limit:dynamic:volcengine:remaining:{model_name}
|
# Format: limit:dynamic:volcengine:remaining:{model_name}
|
||||||
dynamic_key = f"limit:dynamic:volcengine:remaining:{target}"
|
dynamic_key = f"limit:dynamic:volcengine:remaining:{target}"
|
||||||
|
|
||||||
if DEBUG_MODE:
|
if DEBUG_MODE:
|
||||||
print(
|
print(
|
||||||
f"DEBUG: Checking {target} (Configured) (Bal: {int(balance)}, Rem: {int(remaining)})",
|
f"DEBUG: Checking {target} (Configured) (Bal: {int(balance)}, Rem: {int(remaining)})",
|
||||||
@@ -818,7 +812,6 @@ def active_monitor_loop():
|
|||||||
if remaining < temp_min_remaining:
|
if remaining < temp_min_remaining:
|
||||||
temp_min_remaining = remaining
|
temp_min_remaining = remaining
|
||||||
|
|
||||||
|
|
||||||
global_min_remaining = temp_min_remaining if model_balances else 0
|
global_min_remaining = temp_min_remaining if model_balances else 0
|
||||||
last_usage_map["global"] = current_usage_global
|
last_usage_map["global"] = current_usage_global
|
||||||
last_sync_time = now
|
last_sync_time = now
|
||||||
|
|||||||
Reference in New Issue
Block a user