Expand description
In-memory background-task tracker for the Synapse admin API.
Long-running admin actions (room deletion, history purge, bulk redaction) run detached on the runtime and are polled by their id or by the resource they act on. State is process-local: a restart drops history where Synapse persists it for seven days, which consumers tolerate (they poll right after issuing, and a post-restart miss reads as Synapse’s post-retention 404).
Structs§
Enums§
Constants§
- CAPACITY 🔒
- Cap on retained terminal tasks; the oldest are pruned once it is exceeded.
- GC_
INTERVAL 🔒 - Interval between worker garbage-collection sweeps.
- RETENTION_
MS 🔒 - Terminal tasks older than this (seven days) are pruned by the worker.
- TASK_
ID_ 🔒LEN - Random task-id length, matching Synapse’s
random_string(16).
Functions§
- matches_
nonterminal 🔒 - prune_
tasks 🔒 - Drop terminal tasks past the retention window, then cap the survivors.
Type Aliases§
- TaskId 🔒
- A task’s random id: a fixed 16-byte string kept inline.