From b60e1c5b2f1fdf4f3f71dd4d143d2d7051b9f33c Mon Sep 17 00:00:00 2001 From: prplV Date: Fri, 12 Jul 2024 16:11:25 +0300 Subject: [PATCH] ref --- src/main.rs | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/main.rs b/src/main.rs index b60c7d3..5247c2b 100644 --- a/src/main.rs +++ b/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" => { - // tx.send(7).await.unwrap(); - }, - "restart" => {}, - "hold" => {}, - _ => {}, - } + println!("file {} changed!", &file.filename) + // match file.triggers.on_change.as_str() { + // "stop" => { + // tx.send(7).await.unwrap(); + // }, + // "restart" => {}, + // "hold" => {}, + // _ => {}, + // } }, Err(_) => {