fix metrics

migrate
prplV 2025-06-06 09:18:43 -04:00
parent 4133d2f348
commit d4e9a2f875
2 changed files with 13 additions and 5 deletions

View File

@ -529,9 +529,9 @@ impl ProcessExtended {
Some(duration) => { Some(duration) => {
format!("{}:{}:{}:{}", format!("{}:{}:{}:{}",
duration.num_days(), duration.num_days(),
duration.num_hours(), duration.num_hours() % 24,
duration.num_minutes(), duration.num_minutes() % 60,
duration.num_seconds() duration.num_seconds() % 60
) )
}, },
None => String::new() None => String::new()

View File

@ -246,7 +246,11 @@ pub mod v2 {
self.name self.name
); );
if let Err(er) = unfreeze_process(&self.name).await { if let Err(er) = unfreeze_process(&self.name).await {
error!("Cannot unfreeze process {} : {}", self.name, er); if er.to_string().contains("already") {
self.state = ProcessState::Pending;
} else {
error!("Cannot unfreeze process {} : {}", self.name, er);
}
} else { } else {
self.state = ProcessState::Pending; self.state = ProcessState::Pending;
info!("Process {} was unfreezed", &self.name); info!("Process {} was unfreezed", &self.name);
@ -264,7 +268,11 @@ pub mod v2 {
info!("{}: New PID - {}", self.name, self.pid); info!("{}: New PID - {}", self.name, self.pid);
} }
Err(er) => { Err(er) => {
error!("Cannot start process {} : {}", self.name, er); if er.to_string().contains("already") {
self.state = ProcessState::Pending;
} else {
error!("Cannot start process {} : {}", self.name, er);
}
} }
} }
} }