Skip to content

Commit

Permalink
实现Op::Alarm
Browse files Browse the repository at this point in the history
  • Loading branch information
czy-29 committed Sep 11, 2024
1 parent 42aa07b commit ef786c7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,14 @@ async fn main() -> Result<(), anyhow::Error> {
.await
}
Op::Sync => sync::sync(&config).await,
_ => Err(anyhow::anyhow!("暂时todo!")),
Op::Alarm { reason, host } => {
pushover
.send_if_some(
&format!("来自{}的事件:{:?}", host, reason),
PushoverSound::SIREN,
)
.await
}
}
}

Expand Down

0 comments on commit ef786c7

Please sign in to comment.