Watch
0
0
Fork
You've already forked hyperhive
0

archetype flows on the board list the agents the router sends to, and the docs say a switch-off key outlives its flow

This commit is contained in:
atlas 2026-11-11 20:45:07 +01:00 • committed by mara
commit 13ff33ead0

View file

@ -95,11 +95,12 @@ async fn deliveries_answer(js: &jetstream::Context, payload: &[u8]) -> Vec<u8> {
/// cannot be read leaves them out of the counts.
async fn archetype_flows(
client: &async_nats::Client,
js: &jetstream::Context,
document: &swarm_wire::notify_flows::Document,
) -> Vec<crate::flow::ArchetypeFlow> {
let found = async {
let roster = crate::roster_of(js).await.map_err(|e| format!("{e:#}"))?;
let roster = crate::roster_of(client)
.await
.map_err(|e| format!("{e:#}"))?;
crate::archetype_flows::load(client, &roster).await
}
.await;
@ -125,7 +126,7 @@ async fn dry_run_answer(
.check()
.map_err(|why| anyhow::anyhow!("the document fails its check: {why}"))?;
let (flows, _) = request.document.active();
let archetype = archetype_flows(client, js, &request.document).await;
let archetype = archetype_flows(client, &request.document).await;
let mut events: Vec<(String, Vec<u8>)> =
log::newest(js, forge_events::STREAM, DRY_RUN_EVENTS)
.await?