GitHub
Skip to content

Job record

The fields of the fleetjobs/job@1 record that heavy status prints and the store keeps for every job, and the files of the store.

heavy status --json prints { "schema": "fleetjobs/status@1", "jobs": [...] }, and each job is a fleetjobs/job@1 record. Times are seconds since 1970, with fractions.

{
  "schema": "fleetjobs/job@1",
  "id": "b24d675b31",
  "key": "328e0fbe8915da5d",
  "cwd": "/tmp/app",
  "argv": ["sleep", "2"],
  "lane": "light",
  "class": "normal",
  "worktree": "/tmp/app",
  "max": 300,
  "remote": "auto",
  "state": "done",
  "submittedAt": 1796527499.567,
  "startedAt": 1796527499.708,
  "endedAt": 1796527501.714,
  "where": "local",
  "slot": "light-1",
  "exit": 0,
  "owner": { "pid": 3523172, "start": 7811252 },
  "attempts": [{ "where": "local", "exit": 0, "seconds": 2.006 }]
}
json
FieldTypeMeaning
schema"fleetjobs/job@1"The record version
idstringThe job id
keystringA hash of cwd and argv. A live job with the same key is followed, not repeated
cwdstringThe working directory
argvstringThe command and its arguments
lane"heavy" or "light"The lane
class"short", "normal", "long", "confirm" or "sample"How the scheduler treats it. confirm and sample are reruns after a remote result
worktreestringThe checkout, which fair share counts usage by
estimatenumber, optionalSeconds the last runs of this command took
maxnumberThe time limit in seconds, 0 for none
remote"auto", "any" or "never"Whether the job may leave this machine
blockingboolean, optionalA waiting heavy <cmd> started it
state"queued", "running" or "done"Where the job is
submittedAtnumberWhen it was queued
startedAt, endedAtnumber, optionalWhen it started and ended
wherestring, optional"local" or a host name
slotstring, optionalThe local slot, such as heavy-1 or light-1
exitnumber, optionalThe exit code, once done
owner{ pid, start }The supervisor process. start is its start time in clock ticks, so a reused pid does not pass for it
attemptsarrayOne entry for each run: where, exit, seconds, and why when the run was not the final answer, such as "environment", "timeout" or "copy-back failed"

Only a job's supervisor writes its record. A record whose owner died frees its slot.

The store is $HEAVY_DIR, or ~/.local/state/fleetjobs.

PathHolds
jobs/<id>/job.json, stdout and stderr. Folders of jobs that ended are deleted after a day
keys/<key>The id of the live job for that working directory and command
queue.lockHeld for one change at a time
hosts/<name>.jsonThe last probe of a host, valid for 15 seconds, 2 minutes while it is down
trust.jsonThe trust table
night/<id>/A job queued for the night
oom/<scope>Markers of jobs killed for memory
log/jobs.jsonlOne final record for each job. Rolled at 2 MB, kept 30 days