Item 3: route recommends a host worker while providers are down, and says what is down and what to do. done / next: item 4 worker notes

This commit is contained in:
swaits committed 2026-11-23 12:26:10 -07:00
1 parent 1208df9b1b
commit 3307fadee3
3 files changed
+55

No files matched your search

+2
View File
@@ -221,6 +221,8 @@ def choose(candidates, records, availability, kind, difficulty, review_of=None,
def load_ratio(c):
left = c.get("allowance_pct_left")
if left is None and c.get("host_native"):
return 0.0 # a host worker has no allowance to spread work across: the record decides
weight = float(left) if left else UNKNOWN_ALLOWANCE
return stats.get(c["worker"], {}).get("uses", 0) / max(weight, 1.0)