BackfillTracker

Defined in dccd.daemon.api

class BackfillTracker(local_path)[source]

Bases: object

Track backfill jobs launched from the web UI, persisted to disk.

State lives in {local_path}/.dccd/backfill_jobs.json so it survives a UI restart (the persisted status of 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 None if 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 True if it was live.