aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--src/main.rs5
2 files changed, 7 insertions, 0 deletions
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),