remove some useless comments.

This commit is contained in:
primardj 2024-04-12 00:27:29 +01:00
parent 968b9e7e87
commit 3b44aa3a07

View file

@ -42,17 +42,8 @@ impl StatusObj {
}
// TODO: check if there is a process reading the pipe.
// TODO: check if there is a process reading the pipes. supervise/control and supervise/ok
// piste : https://docs.rs/tokio/latest/tokio/net/unix/pipe/struct.OpenOptions.html
//let mut control_option = fs::File::open("supervise/control");
//let status_option = fs::OpenOptions::new().read(true).open("supervise/control");
//match control_option {
// Ok(_file) => {},
// Err(ee) => {
// println!("fail: {}: runsv not running {}", sv, ee);
// return None;
// },
//};
let status_option = fs::OpenOptions::new().read(true).open("supervise/status");
let mut status = match status_option {
Ok(file) => file,
@ -73,8 +64,6 @@ impl StatusObj {
};
if size != 20 {
dbg!(size);
dbg!(contents);
println!("warning: {}: bad supervise/status format", sv);
return None
}
@ -120,7 +109,9 @@ impl StatusObj {
log: log_exists,
})
}
pub fn get_status_string(&mut self) -> String {
// return the status for this service in particular.
let status_sv;
let pid_string: String;