Skip to content
LEAPDocs

Generation jobs & their states

Long work runs as durable background jobs. What the states mean and what to do when one fails.

Why jobs rather than requests

Generating a course takes minutes, not milliseconds. Jobs run on a separate worker service, so a long generation can never starve an interactive request, and you can leave the screen while one runs.

States

queuedWaiting for a worker
processingRunning
completedArtefact stored
failedRetryable

A failed job is retryable on its own. It does not invalidate the gates that already succeeded.

Kinds of job

extractSyllabus to structure.
structureGate and outcome deconstruction.
lesson-genLesson plans and Socratic scripts.
materialsMind maps, infographics, podcasts, flashcards, decks.
content-generatePer-lesson content generation.
grade / gate-gradeMarking attempts and rolling mastery.
guest-gradeMarking Open Quiz guest attempts.
remediationAssembling a targeted quiz from prerequisites.
tag-conceptsMapping questions to concepts for the concept map.

Durability

A deploy will not cost you a course

Jobs resume from their last completed gate rather than restarting when a worker is replaced. Before that change, deploying mid-generation meant paying for the whole course again.

How long it takes

Materials, quizzes and scripts for a gate are fanned out in parallel. A full course generation is roughly a quarter of an hour — it was about forty minutes before that parallelism landed in 2026.08.

When a job fails

  • Retry it first. Most failures are transient — a provider timeout or a rate limit.
  • Repeated failure on one gate usually means that gate’s source material is too thin to ground generation. Fix the gate in review rather than retrying indefinitely.
  • Repeated failure across every gate is a platform problem, not a content one. Raise it.