pub fn spawn_healthcheck_thread(&self) -> Result<()> {
        let interval = self.ctx.config.get_server_healthcheck_interval()?;
        let std_interval = interval.to_std().unwrap();
        info!("Running healthcheck every {}", HumanDuration(interval));

        // run initial healthcheck right away.
        let ctx = self.ctx.clone();
        ctx.check_health()?;

        thread::spawn(move || {
            loop {
                let ctx = ctx.clone();
                run_isolated(move || ctx.check_health());
                thread::sleep(std_interval);
            }
        });

        Ok(())
    }
/// Spawns a background check that checks the health of the system.
Spawns a background check that checks the health of the system.
Spawns a background check that checks the health of the system .
pub fn spawn_healthcheck_thread(&self) -> Result<()> {
        let interval = self.ctx.config.get_server_healthcheck_interval()?;
        let std_interval = interval.to_std().unwrap();
        info!("Running healthcheck every {}", HumanDuration(interval));
        // run initial healthcheck right away.
        let ctx = self.ctx.clone();
        ctx.check_health()?;
        thread::spawn(move || {
            loop {
                let ctx = ctx.clone();
                run_isolated(move || ctx.check_health());
                thread::sleep(std_interval);
            }
        });
        Ok(())
    }
pub fn spawn_healthcheck_thread ( & self ) -> Result < ( ) > { let interval = self . ctx . config . get_server_healthcheck_interval ( ) ? ; let std_interval = interval . to_std ( ) . unwrap ( ) ; info ! ( " " HumanDuration ( interval ) ) ; // run initial healthcheck right away. let ctx = self . ctx . clone ( ) ; ctx . check_health ( ) ? ; thread :: spawn ( move | | { loop { let ctx = ctx . clone ( ) ; run_isolated ( move | | ctx . check_health ( ) ) ; thread :: sleep ( std_interval ) ; } } ) ; Ok ( ( ) ) }
Spawns a background check that checks the health of the system.
Spawns a background check that checks the health of the system .
&self