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:
parent
68c24643f6
commit
13ff33ead0
1 changed files with 66 additions and 30 deletions
|
|
@ -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?
|
||||
|
|
|
|||
Loading…
Reference in a new issue