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