Answer product-owner round 1: 0 🔴, 0 🟡; name the slot folder and fuser in the wait message, keep help calls light, and give the reviewer's suite the long timeout
This commit is contained in:
@@ -52,7 +52,7 @@ def held_slot(folder: pathlib.Path, slots: int) -> int | Failure:
|
||||
"""The number of the slot this call holds, its lock left for the command to inherit, or why no slot could be taken."""
|
||||
try:
|
||||
folder.mkdir(parents=True, exist_ok=True)
|
||||
slot, fd = waited_slot(folder, slots, lambda: print(f"run-heavy: waiting for one of the machine's {slots} heavy slots", file=sys.stderr, flush=True))
|
||||
slot, fd = waited_slot(folder, slots, lambda: print(f"run-heavy: waiting for one of the machine's {slots} heavy slots in {folder}; `fuser {folder}/slot-*` names the processes that hold them", file=sys.stderr, flush=True))
|
||||
except OSError as failure:
|
||||
return Failure(f"cannot take a heavy slot in {folder}: {failure.strerror}")
|
||||
# The command inherits the locked file, so the slot stays held until it exits.
|
||||
|
||||
Reference in New Issue
Block a user