fn handle_failed_service(deps: Vec<ServiceName>, failed_sh: &Service) -> Vec<Event> {
    match failed_sh.failure.strategy {
        FailureStrategy::Shutdown => vec![Event::ShuttingDownInitiated(ShuttingDown::Gracefuly)],
        FailureStrategy::KillDependents => {
            debug!("Failed service has kill-dependents strategy, going to mark them all..");
            deps.iter()
                .map(|sh| {
                    vec![
                        Event::new_status_update(sh, ServiceStatus::InKilling),
                        Event::Kill(sh.clone()),
                    ]
                })
                .flatten()
                .collect()
        }
        FailureStrategy::Ignore => vec![],
    }
}
/// This is applied to both failed and FinishedFailed services.
This is applied to both failed and FinishedFailed services.
This is applied to both failed and FinishedFailed services .
fn handle_failed_service(deps: Vec<ServiceName>, failed_sh: &Service) -> Vec<Event> {
    match failed_sh.failure.strategy {
        FailureStrategy::Shutdown => vec![Event::ShuttingDownInitiated(ShuttingDown::Gracefuly)],
        FailureStrategy::KillDependents => {
            debug!("Failed service has kill-dependents strategy, going to mark them all..");
            deps.iter()
                .map(|sh| {
                    vec![
                        Event::new_status_update(sh, ServiceStatus::InKilling),
                        Event::Kill(sh.clone()),
                    ]
                })
                .flatten()
                .collect()
        }
        FailureStrategy::Ignore => vec![],
    }
}
fn handle_failed_service ( deps : Vec < ServiceName > , failed_sh : & Service ) -> Vec < Event > { match failed_sh . failure . strategy { FailureStrategy :: Shutdown => vec ! [ Event ShuttingDownInitiated ( ShuttingDown Gracefuly ) ] , FailureStrategy :: KillDependents => { debug ! ( " " ) ; deps . iter ( ) . map ( | sh | { vec ! [ Event new_status_update ( sh ServiceStatus InKilling ) Event Kill ( sh clone ( ) ) ] } ) . flatten ( ) . collect ( ) } FailureStrategy :: Ignore => vec ! [ ] , } }
This is applied to both failed and FinishedFailed services.
This is applied to both failed and FinishedFailed services .
deps
Vec<ServiceName>
failed_sh
&Service
deps
Vec<ServiceName>
failed_sh
&Service