ref
parent
b62eb8caf6
commit
b60e1c5b2f
21
src/main.rs
21
src/main.rs
|
|
@ -3,12 +3,12 @@ use serde_json;
|
|||
use tokio::join;
|
||||
use core::panic;
|
||||
use std::fmt::Debug;
|
||||
use std::{clone, fs};
|
||||
use std::fs;
|
||||
use std::path::Path;
|
||||
use std::process::{ Command, Output };
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::sync::{ Arc, Mutex };
|
||||
use tokio::time::{ Duration, Instant };
|
||||
use tokio::sync::{mpsc, watch};
|
||||
use tokio::sync::mpsc;
|
||||
use inotify::{ Inotify, WatchMask };
|
||||
|
||||
/// # an Error enum (nextly will be deleted and replaced)
|
||||
|
|
@ -388,14 +388,15 @@ async fn file_handler
|
|||
let events = notify.read_events(&mut buffer);
|
||||
match events {
|
||||
Ok(_) => {
|
||||
match file.triggers.on_change.as_str() {
|
||||
"stop" => {
|
||||
println!("file {} changed!", &file.filename)
|
||||
// match file.triggers.on_change.as_str() {
|
||||
// "stop" => {
|
||||
// tx.send(7).await.unwrap();
|
||||
},
|
||||
"restart" => {},
|
||||
"hold" => {},
|
||||
_ => {},
|
||||
}
|
||||
// },
|
||||
// "restart" => {},
|
||||
// "hold" => {},
|
||||
// _ => {},
|
||||
// }
|
||||
},
|
||||
Err(_) => {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue