|
|
|
@ -49,13 +49,13 @@ impl Apps {
|
|
|
|
|
(procs, holds)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub fn run(&self, procs: Vec<Proc>, holds: Option<i8>) -> Result<()> {
|
|
|
|
|
pub fn run(&self, procs: Vec<Proc>, holds: Option<i8>) -> Result<Vec<Proc>> {
|
|
|
|
|
let mut procs = procs;
|
|
|
|
|
let mut holds = holds;
|
|
|
|
|
|
|
|
|
|
if holds.unwrap_or(0) < 1 {
|
|
|
|
|
error!("no holds configured");
|
|
|
|
|
return Ok(());
|
|
|
|
|
return Ok(Vec::new());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
while holds > Some(0) {
|
|
|
|
@ -99,12 +99,6 @@ impl Apps {
|
|
|
|
|
procs = newprocs;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
info!("shutting down");
|
|
|
|
|
for mut proc in procs {
|
|
|
|
|
info!("stopping {}", &proc.app.name);
|
|
|
|
|
let _ = proc.child.kill();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Ok(())
|
|
|
|
|
Ok(procs)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|