The stream is mail, not shouted
Publish release / package (aarch64, , aarch64, , , ) (push) Failing after 2s
Publish release / package (x86_64, /var/local/cargo-target/iris-cargo-home, bare, /usr/bin/sccache, /var/local/rustup, /var/local/cargo-target) (push) Failing after 21s
Test / test (push) Successful in 25s

Matches portal 0.3.44. The unit runs /usr/bin/gdo.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Bendik Aagaard Lynghaug
2026-09-23 21:15:40 +02:00
co-authored by Claude Fable 5.1
parent 29481e69df
commit 1c1a8f4309
7 changed files with 14 additions and 10 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
//! gdo - the transmitter that sends the code through the gate so the
//! iris opens. Portal (uhhm/portal) decides when a person hears
//! something and renders the mail; gdo holds a durable consumer on
//! the `WORMHOLE` stream and hands each message to the host's SMTP.
//! the `mail` stream and hands each message to the host's SMTP.
//! No site knowledge, no state of its own: if it dies, the stream
//! keeps the mail until it is back.
//!
@@ -22,7 +22,7 @@ use std::time::Duration;
/// Portal's side of this contract is `portal::mail`. Same names, same
/// stream config, so whichever boots first creates it.
const STREAM: &str = "WORMHOLE";
const STREAM: &str = "mail";
const SUBJECTS: &str = "portal.mail.>";
const SUBJECT: &str = "portal.mail.send";
const CONTRACT: u8 = 1;
@@ -255,7 +255,7 @@ async fn probe(cfg: Config, to: &str, from: &str) -> anyhow::Result<()> {
let mut headers = async_nats::HeaderMap::new();
headers.insert("Nats-Msg-Id", id.as_str());
js.publish_with_headers(SUBJECT, headers, serde_json::to_vec(&mail)?.into()).await?.await?;
println!("sent {id} into {STREAM}");
println!("sent {id} into stream {STREAM}");
let deadline = tokio::time::Instant::now() + Duration::from_secs(60);
loop {
let Ok(mut consumer) = stream.get_consumer::<async_nats::jetstream::consumer::pull::Config>(&cfg.consumer).await else {