pull/9/head
prplV 2024-07-12 16:11:25 +03:00
parent b62eb8caf6
commit b60e1c5b2f
1 changed files with 12 additions and 11 deletions

View File

@ -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(_) => {