Set null pyworker client cost to 1

Match the server-side workload_calculator (1.0) so the autoscaler routing
hint is consistent with what the worker reports. A null reservation is a
unitless slot — no reason for client cost to be 100.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rob Ballantyne
2026-05-11 17:47:19 +01:00
parent dc423e2999
commit 147bf2597a
+1 -1
View File
@@ -36,7 +36,7 @@ async def reserve(
start = time.monotonic() start = time.monotonic()
log.info("[%s] POST /reserve duration=%ss", label, duration) log.info("[%s] POST /reserve duration=%ss", label, duration)
try: try:
resp = await endpoint.request("/reserve", payload, cost=100) resp = await endpoint.request("/reserve", payload, cost=1)
elapsed = time.monotonic() - start elapsed = time.monotonic() - start
log.info("[%s] returned after %.1fs: %s", label, elapsed, resp.get("response")) log.info("[%s] returned after %.1fs: %s", label, elapsed, resp.get("response"))
return resp["response"] return resp["response"]