INNER CODE UNIT · Python
remaining
lij768423-svg/grok-register-panel · batch_supervisor.py:244
remaining = max(0, target - completed)
if remaining <= 0:
print(
f"[supervisor] batch complete completed={completed}/{target} restarts={restarts}",
flush=True,
)
return 0
if restarts > max(0, int(max_restarts)):
print(
f"[supervisor] restart limit reached remaining={remaining} restarts={restarts}",
flush=True,
)
return 1
command = [str(part) for part in child_command_builder(remaining, worker_count)]
env = {**os.environ, **dict(child_env or {})}
env[PROGRESS_ENV] = str(progress_path)
print(