Skip to content

Commit 8d372dc

Browse files
committed
feat(engine): add humantime_serde to threshold Duration
1 parent f978606 commit 8d372dc

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ serde_json = { version = "1.0.140", optional = true }
5858

5959
# Deps for health-monitor-telegram feature
6060
teloxide = { version = "0.17.0", optional = true }
61+
humantime-serde = "1.1.1"
6162

6263
[dev-dependencies]
6364
anyhow = "1.0.98"

src/engine.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ pub enum EngineRequest {
3131
#[derive(Debug, Deserialize)]
3232
pub struct Throttle {
3333
max_bloops: usize,
34+
#[serde(with = "humantime_serde")]
3435
threshold: Duration,
3536
}
3637

0 commit comments

Comments
 (0)