diff --git a/settings.json b/settings.json index ba72219..16a1652 100644 --- a/settings.json +++ b/settings.json @@ -22,5 +22,25 @@ } }] } - }] + }, + { + "name" : "temp-process", + "path" : "/home/vladislav/web/temp-process", + "dependencies" : { + "files" : [ + { + "filename" : "control-file", + "src" : "/home/vladislav/web/" + }], + "services" : [{ + "hostname" : "ya.ru", + "port" : 443, + "triggers" : { + "wait" : 200, + "delay" : 3 + } + }] + } + } + ] } diff --git a/src/main.rs b/src/main.rs index d023e98..c145216 100644 --- a/src/main.rs +++ b/src/main.rs @@ -121,7 +121,7 @@ async fn run_daemons( _ = serv_hand => {}, _ = rx.recv() => { terminate_process(&proc.name).await; - println!("Process stopped due to error with dependency handling"); + println!("Dependency handling error: Terminating {} process ..." , &proc.name); }, } } @@ -188,7 +188,7 @@ async fn file_handler(name: &str, files: &Vec, tx: mpsc::Sender) { } match check_file(&file.filename, &file.src) { Ok(_) => { - println!("{} is still in directory!", &file.filename); + // println!("{} is still in directory!", &file.filename); }, Err(_) => { tx.send(1).await.unwrap(); @@ -216,7 +216,7 @@ async fn service_handler(name: &str, services: &Vec, tx: mpsc::Sender< } match check_service(&serv.hostname, &serv.port) { Ok(_) => { - println!("{} is up!", &serv.hostname); + // println!("{} is up!", &serv.hostname); }, Err(_) => { tx.send(1).await.unwrap();