Expand description
Jobs: discrete non-conversational units of work (image generation and other
generators) with progress and a persisted terminal result. This module holds
the pure data model, the seed injection, and the terminal-job history store;
the async scheduler that drives runners lives in the runtime crate.
Structs§
- Job
- A discrete unit of work with progress and a persisted terminal result. Its
on-disk form (in
jobs.json) is internal, so field names are the native snake_case. - JobHistory
Store - A bounded, newest-first store of concluded jobs. Lazily loaded; a corrupt
jobs.jsonis quarantined and the store starts empty rather than failing. - JobProgress
- A job’s progress: a
[0, 1]fraction plus the raw step counts it came from.
Enums§
- JobEvent
- What the scheduler publishes to
events(id)observers. Coarser than the runtime stream: it collapses the runner’s ticks into the observable state. - JobRuntime
Event - One item a job runtime (image generation) streams back. The sidecar job pump
emits
Started/Progress/Preview/Result;StatusandArtifactsare added by the scheduler layer that wraps the pump. - JobState
- A job’s lifecycle state.
Functions§
- reseeded
- Re-seed
paramswith a fresh seed guaranteed to differ from its current one (used by “vary”). A non-object payload is returned unchanged. - seeded
- Inject a random
seedintopayloadwhen it is a JSON object (or null, treated as empty) that carries no non-nullseed. Anything else, and any object that already pins a seed, is returned unchanged.