uniqc.gateway.db.archive_store module¶
Archive store — moves tasks in/out of the archived_tasks table.
The archive lives in the same tasks.sqlite file as the main task store.
This module provides an ArchiveStore class that mirrors TaskStore’s
interface but operates on the archived_tasks table.
- class uniqc.gateway.db.archive_store.ArchiveStore[source]¶
Bases:
objectPersistent archive for completed / failed tasks.
Tasks are moved atomically from
tasks→archived_tasksso that the hot-path query ontasksstays fast even when many historical tasks have accumulated.- archive_task(task_id)[source]¶
Move a task from
taskstoarchived_tasks.Cascades shards to
archived_task_shardsfirst; the task row’sON DELETE CASCADEwould otherwise wipe them silently.Returns
Trueif the task existed and was moved.