From 2ba9419409b16d0b1fdb8f8bc8b1b8579177d0d8 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Thu, 16 Oct 2025 18:51:45 +0100 Subject: Documentation --- README.md | 2 ++ src/main.rs | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/README.md b/README.md index 53937c4..4cbeb90 100644 --- a/README.md +++ b/README.md @@ -96,3 +96,5 @@ it being ran every time a new MQTT message is published to this topic. * mTLS * Graceful signal handling * Graceful program stdout/stderr handling +* Configuration of MQTT parameters +* Fix bug: Process timeouts and cancellations do not get reaped. diff --git a/src/main.rs b/src/main.rs index 2d20c94..a6bfbaa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -81,9 +81,14 @@ async fn main() -> anyhow::Result<()> { continue; } debug!("Message {p:?} matched topic {topic}"); + // TODO: Factor this out into a function for program in route.programs.iter() { let p = p.clone(); scope.spawn(async move { + // TODO: BUG: This won't guarentee the process gets + // killed. kill_on_drop itself also has problems. + // Need to handle this properly manually. + // TODO: Also should use cancellation tokens. match timeout( program.timeout.unwrap_or(conf.timeout), run(&program.command, &p), -- cgit v1.2.3-70-g09d2