Skip to main content

Module parse_jobs

Module parse_jobs 

Source
Expand description

Parse jobs: each (root, content hash, schedr version) is parsed once, by one worker that reported it. A parse whose files failed transiently (a timeout, a runner that died) is parsed again (decision 72.2), after a delay that doubles with each retry up to MAX_RETRY_DELAY, preferring another worker: without a limit, since the code may be fine.

Jobs live in the master’s memory: after a restart, workers report their hashes again and a hash with no stored parse gets a new job. A job whose worker is lost, or that isn’t finished within the job timeout, goes to another worker that reported the same hash (see archive/PROJECT.md, DAG ID conflicts: no duplicate parsing).

Structs§

ParseAssignment
A parse job given to a worker: what AssignParse sends.
ParseJobs
The parse jobs not finished yet.
ParseKey
What a parse job parses.

Constants§

FIRST_RETRY_DELAY
The delay before the first retry of a parse that failed transiently.
MAX_RETRY_DELAY
The longest delay between two retries of a parse that keeps failing transiently.
PARSE_JOB_TIMEOUT
How long a worker has for a parse job before it goes to another worker (or the same one again, if no other reported the hash).