drop the hive-side matrix code: sweep, hivectl matrix and the apiUrl option
This commit is contained in:
parent
a00bcb8c05
commit
6dbb18b6d4
1 changed files with 49 additions and 1007 deletions
|
|
@ -26,7 +26,6 @@ mod gateway_nginx;
|
|||
mod job_queue;
|
||||
mod lifecycle;
|
||||
mod loose_ends;
|
||||
mod matrix;
|
||||
mod meta;
|
||||
mod meta_rev;
|
||||
mod migrate;
|
||||
|
|
@ -233,7 +232,7 @@ async fn cmd_serve(
|
|||
socket: &std::path::Path,
|
||||
) -> Result<()> {
|
||||
// Move any host-side state still at the legacy flat layout into its
|
||||
// subdir (`db/`, `forge/`, `matrix/`, `run/`) BEFORE opening the
|
||||
// subdir (`db/`, `forge/`, `run/`) BEFORE opening the
|
||||
// broker db — the broker + build-logs dbs are among the relocated
|
||||
// files. Idempotent; a no-op once migrated.
|
||||
crate::paths::relocate_legacy_state();
|
||||
|
|
@ -307,29 +306,6 @@ async fn cmd_serve(
|
|||
}
|
||||
}
|
||||
});
|
||||
// Matrix sweep (`matrix::ensure_all`): the hive's own sender token, kept
|
||||
// on disk for `hivectl matrix invite`. It
|
||||
// creates no accounts or tokens — swarm-controller mints those.
|
||||
// No-op when the hive-matrix container isn't running. Re-submitted every
|
||||
// 30 minutes; the startup pass is the boot `MatrixSweep` node.
|
||||
let mut matrix_shutdown = coord.shutdown_rx();
|
||||
let matrix_coord = coord.clone();
|
||||
tokio::spawn(async move {
|
||||
let interval = std::time::Duration::from_mins(30);
|
||||
loop {
|
||||
tokio::select! {
|
||||
() = tokio::time::sleep(interval) => submit_periodic_sweep(
|
||||
&matrix_coord,
|
||||
&job_queue::NodeKind::MatrixSweep,
|
||||
job_queue::templates::matrix_sweep,
|
||||
),
|
||||
_ = matrix_shutdown.changed() => {
|
||||
tracing::info!("matrix ensure_all: shutdown signal received");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
// Periodic broker vacuum: drop fully-acked messages older
|
||||
// than 30 days. Delivered-but-unacked rows (recoverable via
|
||||
// requeue_inflight) and undelivered rows are always kept.
|
||||
|
|
|
|||
Loading…
Reference in a new issue