remove debug prints
This commit is contained in:
parent
84db221f96
commit
21418ce45d
11
src/main.rs
11
src/main.rs
@ -1,4 +1,4 @@
|
|||||||
//#![windows_subsystem = "windows"]
|
#![windows_subsystem = "windows"]
|
||||||
|
|
||||||
use chrono::prelude::*;
|
use chrono::prelude::*;
|
||||||
use chrono::{DateTime, Local, TimeZone};
|
use chrono::{DateTime, Local, TimeZone};
|
||||||
@ -76,8 +76,6 @@ impl Config {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
fn is_in_time(&self, value: TimeHM) -> bool {
|
fn is_in_time(&self, value: TimeHM) -> bool {
|
||||||
dbg!(value);
|
|
||||||
dbg!(self.start <= value && value <= self.end);
|
|
||||||
self.start <= value && value <= self.end
|
self.start <= value && value <= self.end
|
||||||
}
|
}
|
||||||
fn is_active(&self) -> bool {
|
fn is_active(&self) -> bool {
|
||||||
@ -89,15 +87,11 @@ impl Config {
|
|||||||
}
|
}
|
||||||
fn is_target_alive(&self) -> bool {
|
fn is_target_alive(&self) -> bool {
|
||||||
let name = self.target_name();
|
let name = self.target_name();
|
||||||
dbg!(&name);
|
|
||||||
let sp = System::new_all();
|
let sp = System::new_all();
|
||||||
let procs = sp.processes_by_exact_name(&name);
|
let procs = sp.processes_by_exact_name(&name);
|
||||||
let count = procs.count();
|
procs.count() > 0
|
||||||
dbg!(count);
|
|
||||||
count > 0
|
|
||||||
}
|
}
|
||||||
fn relaunch_target(&self) {
|
fn relaunch_target(&self) {
|
||||||
dbg!(&self.command);
|
|
||||||
let mut cmd = Command::new(&self.command);
|
let mut cmd = Command::new(&self.command);
|
||||||
cmd.current_dir(&self.workdir);
|
cmd.current_dir(&self.workdir);
|
||||||
if let Some(args) = &self.args {
|
if let Some(args) = &self.args {
|
||||||
@ -109,7 +103,6 @@ impl Config {
|
|||||||
(!self.command.is_empty()) && self.delay > 0
|
(!self.command.is_empty()) && self.delay > 0
|
||||||
}
|
}
|
||||||
fn main_loop(self) {
|
fn main_loop(self) {
|
||||||
dbg!(self.is_valid());
|
|
||||||
if !self.is_valid() {
|
if !self.is_valid() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user