remove debug prints

This commit is contained in:
Dmitry Belyaev 2023-04-17 12:25:59 +03:00
parent 84db221f96
commit 21418ce45d
Signed by: b4tman
GPG Key ID: 41A00BF15EA7E5F3

View File

@ -1,4 +1,4 @@
//#![windows_subsystem = "windows"]
#![windows_subsystem = "windows"]
use chrono::prelude::*;
use chrono::{DateTime, Local, TimeZone};
@ -76,8 +76,6 @@ impl Config {
}
}
fn is_in_time(&self, value: TimeHM) -> bool {
dbg!(value);
dbg!(self.start <= value && value <= self.end);
self.start <= value && value <= self.end
}
fn is_active(&self) -> bool {
@ -89,15 +87,11 @@ impl Config {
}
fn is_target_alive(&self) -> bool {
let name = self.target_name();
dbg!(&name);
let sp = System::new_all();
let procs = sp.processes_by_exact_name(&name);
let count = procs.count();
dbg!(count);
count > 0
procs.count() > 0
}
fn relaunch_target(&self) {
dbg!(&self.command);
let mut cmd = Command::new(&self.command);
cmd.current_dir(&self.workdir);
if let Some(args) = &self.args {
@ -109,7 +103,6 @@ impl Config {
(!self.command.is_empty()) && self.delay > 0
}
fn main_loop(self) {
dbg!(self.is_valid());
if !self.is_valid() {
return;
}