Skip to content

Commit f285502

Browse files
authored
0.2.20 (#73)
* Add additional event hook for "container not running" in apply_template * Add connection forcibly closed hook to event hooks in apply_template * Bump version to 0.2.20 in Cargo.toml and Cargo.lock --------- Co-authored-by: Ľubomír Kurčák <[email protected]>
1 parent 5c2d069 commit f285502

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

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

src/job/template.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,24 @@ impl Job {
4343
},
4444
action: Action::FastRestart,
4545
});
46+
47+
self.event_hooks.push(Hook {
48+
name: "container not running hook".to_string(),
49+
event: Event::DetectSubstring {
50+
contains: "container not running".to_string(),
51+
stream: Stream::Any,
52+
},
53+
action: Action::Restart,
54+
});
55+
56+
self.event_hooks.push(Hook {
57+
name: "connection forcibly closed hook".to_string(),
58+
event: Event::DetectSubstring {
59+
contains: "An existing connection was forcibly closed".to_string(),
60+
stream: Stream::Any,
61+
},
62+
action: Action::FastRestart,
63+
});
4664
}
4765
}
4866
}

0 commit comments

Comments
 (0)