BackfillTracker¶
Defined in dccd.daemon.api
- class BackfillTracker(local_path)[source]
Bases:
objectTrack backfill jobs launched from the web UI, persisted to disk.
State lives in
{local_path}/.dccd/backfill_jobs.jsonso it survives a UI restart (the persistedstatusof an interrupted job stays'running'until overwritten — the thread itself does not survive a process restart).- Parameters:
- local_pathstr or Path
Root data directory (
CollectorConfig.storage.local_path).
- get(job_id)[source]
Return a single job record, or
Noneif unknown.
- snapshot()[source]
Return a snapshot of all tracked jobs.
- start(cfg, exchange, pairs, start, parallel=False)[source]
Launch a backfill in a background thread and return its id.
- stop(job_id)[source]
Signal a running job to cancel. Return
Trueif it was live.