Skip to content

Commit 5c2d069

Browse files
authored
0.2.19 (#70)
* Add timeout hook to event hooks in Job template * Bump version to 0.2.19 and update dependencies for clap and tokio --------- Co-authored-by: Ľubomír Kurčák <[email protected]>
1 parent 7973bb8 commit 5c2d069

File tree

3 files changed

+46
-96
lines changed

3 files changed

+46
-96
lines changed

Cargo.lock

Lines changed: 34 additions & 93 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tend"
3-
version = "0.2.18"
3+
version = "0.2.19"
44
authors = ["Ľubomír Kurčák <[email protected]>"]
55
description = "Command-line tool for managing and running multiple processes"
66
edition = "2024"
@@ -21,15 +21,15 @@ exclude = [
2121

2222
[dependencies]
2323
anyhow = "1.0.100"
24-
clap = { version = "4.5.48", features = ["derive"] }
24+
clap = { version = "4.5.51", features = ["derive"] }
2525
colored = "3.0.0"
2626
dirs-next = "2.0.0"
2727
folktime = "0.2.1"
2828
prettytable-rs = "0.10.0"
2929
process-wrap = { version = "9.0.0", features = ["tokio1"] }
3030
serde = { version = "1.0.228", features = ["derive"] }
3131
serde_json = "1.0.145"
32-
tokio = { version = "1.47.1", features = [
32+
tokio = { version = "1.48.0", features = [
3333
"rt-multi-thread",
3434
"macros",
3535
"time",

src/job/template.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ impl Job {
3434
},
3535
action: Action::FastRestart,
3636
});
37+
38+
self.event_hooks.push(Hook {
39+
name: "timeout hook".to_string(),
40+
event: Event::DetectSubstring {
41+
contains: "Timeout occurred".to_string(),
42+
stream: Stream::Any,
43+
},
44+
action: Action::FastRestart,
45+
});
3746
}
3847
}
3948
}

0 commit comments

Comments
 (0)