diff options
| author | Tomasz Kramkowski <tomasz@kramkow.ski> | 2025-10-16 18:51:45 +0100 |
|---|---|---|
| committer | Tomasz Kramkowski <tomasz@kramkow.ski> | 2025-10-16 18:51:45 +0100 |
| commit | 2ba9419409b16d0b1fdb8f8bc8b1b8579177d0d8 (patch) | |
| tree | 54e64590bfc25e162c630631ab240016e5918c90 | |
| parent | 8b0892e0794dee32fefaaa0fbf7b50b81a265076 (diff) | |
| download | mqttr-2ba9419409b16d0b1fdb8f8bc8b1b8579177d0d8.tar.gz mqttr-2ba9419409b16d0b1fdb8f8bc8b1b8579177d0d8.tar.xz mqttr-2ba9419409b16d0b1fdb8f8bc8b1b8579177d0d8.zip | |
Documentation
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | src/main.rs | 5 |
2 files changed, 7 insertions, 0 deletions
@@ -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), |
