Expand description
The retired dynamic_workers table, kept only to drain it.
Worker persistence moved onto the sessions table, which is keyed by
(org, project, label) and carries the same re-spawn arguments. This
module survives for one thing: list_all, which the boot’s sweep
reads, delete, which removes each row once it has been copied, and
drop_table, which then removes the table. Do not add a write path
back.
Re-exports§
use redb::ReadableTable;🔒use redb::ReadableTableMetadata;🔒use redb::TableDefinition;🔒use serde::Deserialize;🔒use serde::Deserialize;🔒use serde::Serialize;🔒use serde::Serialize;🔒use super::Db;🔒
Structs§
- Dynamic
Worker - A persisted worker’s re-spawn args, as the retired table stored them. The spawning lead’s session_id was deliberately absent: a re-spawn re-parents to whatever lead is current on reconnect.
Constants§
Functions§
- count
- How many rows the table holds, readable or not.
- delete
- Remove one row, once the sweep has copied it into
sessions. This is what makes the sweep’s own progress durable: a row still here is a row whose arguments exist nowhere else yet, whatever happened to an earlier boot. - drop_
table - Remove the table, once the sweep has drained it. Returns whether a table was there to drop. Callers compact afterwards, because dropping a table reclaims nothing on its own.
- list_
all - Every persisted worker, in key order. The one-time sweep into the
sessionstable reads the whole set, not one project’s slice.