fleetjobs keeps the command line of the bash heavy. heavy <cmd> and heavy --light <cmd> work as before, and so do status, night and the variables below. What changes is that jobs queue and no longer give up.
Changes
Section titled "Changes"| Bash heavy | fleetjobs |
|---|---|
Waits HEAVY_WAIT seconds for a slot, then exits 75 | Queues the job with no limit. HEAVY_WAIT does nothing |
| One process per call, killed with its shell | A detached job. heavy wait <id> picks it up again |
| No way to queue and return | heavy submit <cmd> prints a job id |
Hosts in ~/.config/heavy/remotes, or in HEAVY_REMOTES | hosts in ~/.config/fleetjobs/config.json. HEAVY_REMOTES does nothing |
| Slot counts fixed in the script | local in the config file |
Logs in ~/.cache/heavy.log | One JSON record for each job in log/jobs.jsonl in the store |
| Every remote failure runs here again | Only suspect ones, by the trust table |
HEAVY_DIR defaulted to ~/.cache | It defaults to ~/.local/state/fleetjobs |
A full queue no longer gives exit 75. A job exits 75 only when nobody has waited for it for 10 minutes, or 60 if it came from heavy submit. HEAVY_ABANDON changes the 10 minutes.
The scope names, HEAVY_SLICE and the retry after an out-of-memory kill stay the same, so a tool that watches them keeps working.
Compare before you switch
Section titled "Compare before you switch"heavy replay reads the old logs and runs the scheduler over them, so you can see what the queue would have done:
heavy replay --policy bash
heavy replay --policy default --host build-box:2The first run checks that the replay reproduces your logged waits. The second shows waits under the new scheduler with a host of two slots. See replay.
Switch
Section titled "Switch"- Install fleetjobs and put its
heavyahead of the old script onPATH. - Move the lines of
~/.config/heavy/remotesintohosts. See Remote hosts. - Let the old jobs drain. Both versions share the host slots in
~/overflowwhile they do. - Point agents at the For agents page.