fix metrics
parent
4133d2f348
commit
d4e9a2f875
|
|
@ -529,9 +529,9 @@ impl ProcessExtended {
|
|||
Some(duration) => {
|
||||
format!("{}:{}:{}:{}",
|
||||
duration.num_days(),
|
||||
duration.num_hours(),
|
||||
duration.num_minutes(),
|
||||
duration.num_seconds()
|
||||
duration.num_hours() % 24,
|
||||
duration.num_minutes() % 60,
|
||||
duration.num_seconds() % 60
|
||||
)
|
||||
},
|
||||
None => String::new()
|
||||
|
|
|
|||
|
|
@ -246,7 +246,11 @@ pub mod v2 {
|
|||
self.name
|
||||
);
|
||||
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 {
|
||||
self.state = ProcessState::Pending;
|
||||
info!("Process {} was unfreezed", &self.name);
|
||||
|
|
@ -264,7 +268,11 @@ pub mod v2 {
|
|||
info!("{}: New PID - {}", self.name, self.pid);
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue