fn reload(&mut self, launcher: &LauncherCli) {
        let _timer = hook_timer("reload");
        self.needs_reload = false;
        if self.process_down() || self.hooks.reload.is_none() {
            if let Some(err) =
                self.supervisor
                    .lock()
                    .expect("Couldn't lock supervisor")
                    .restart(&self.pkg,
                             &self.service_group,
                             launcher,
                             self.svc_encrypted_password.as_ref().map(String::as_ref))
                    .err()
            {
                outputln!(preamble self.service_group, "Service restart failed: {}", err);
            }
        } else {
            let hook = self.hooks.reload.as_ref().unwrap();
            hook.run(&self.service_group,
                     &self.pkg,
                     self.svc_encrypted_password.as_ref());
        }
    }
/// Runs the reconfigure hook if present, otherwise restarts the service.
Runs the reconfigure hook if present, otherwise restarts the service.
Runs the reconfigure hook if present otherwise restarts the service .
fn reload(&mut self, launcher: &LauncherCli) {
        let _timer = hook_timer("reload");
        self.needs_reload = false;
        if self.process_down() || self.hooks.reload.is_none() {
            if let Some(err) =
                self.supervisor
                    .lock()
                    .expect("Couldn't lock supervisor")
                    .restart(&self.pkg,
                             &self.service_group,
                             launcher,
                             self.svc_encrypted_password.as_ref().map(String::as_ref))
                    .err()
            {
                outputln!(preamble self.service_group, "Service restart failed: {}", err);
            }
        } else {
            let hook = self.hooks.reload.as_ref().unwrap();
            hook.run(&self.service_group,
                     &self.pkg,
                     self.svc_encrypted_password.as_ref());
        }
    }
fn reload ( & mut self , launcher : & LauncherCli ) { let _timer = hook_timer ( " " ) ; self . needs_reload = false ; if self . process_down ( ) || self . hooks . reload . is_none ( ) { if let Some ( err ) = self . supervisor . lock ( ) . expect ( " " ) . restart ( & self . pkg , & self . service_group , launcher , self . svc_encrypted_password . as_ref ( ) . map ( String :: as_ref ) ) . err ( ) { outputln ! ( preamble self service_group " " err ) ; } } else { let hook = self . hooks . reload . as_ref ( ) . unwrap ( ) ; hook . run ( & self . service_group , & self . pkg , self . svc_encrypted_password . as_ref ( ) ) ; } }
Runs the reconfigure hook if present, otherwise restarts the service.
Runs the reconfigure hook if present otherwise restarts the service .
&mut self
launcher
&LauncherCli
&mut self
launcher
&LauncherCli