diff options
Diffstat (limited to 'src/service/command.rs')
-rw-r--r-- | src/service/command.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/service/command.rs b/src/service/command.rs index 6b44e1d..7f3bd59 100644 --- a/src/service/command.rs +++ b/src/service/command.rs @@ -1,12 +1,9 @@ use std::{process::Stdio, time::Duration}; use serde::{Deserialize, Serialize}; -use tokio::{ - io::{AsyncBufReadExt, BufReader}, - sync::watch::Sender, -}; +use tokio::io::{AsyncBufReadExt, BufReader}; -use crate::Status; +use crate::status::Sender; use super::IntoService; @@ -43,7 +40,7 @@ pub struct Command { } impl Command { - async fn persist(&self, tx: Sender<Status>) -> Result<(), Error> { + async fn persist(&self, tx: Sender) -> Result<(), Error> { let mut command = tokio::process::Command::new(&self.command); command.args(&self.args); @@ -83,7 +80,7 @@ impl Command { } impl IntoService for Command { - async fn into_service(self, tx: tokio::sync::watch::Sender<Status>) { + async fn into_service(self, tx: Sender) { let mut interval = tokio::time::interval(self.interval); loop { interval.tick().await; |