MCPcopy Create free account
hub / github.com/Autoparallel/learner / restart

Method restart

crates/learnerd/src/daemon/mod.rs:323–327  ·  view source on GitHub ↗

TODO (autoparallel): this is actually never really able to be used at the moment. Restarts the daemon process with a 1-second delay between stop and start. # Errors Returns `LearnerdErrors` if either stop or start operations fail.

(&self)

Source from the content-addressed store, hash-verified

321 ///
322 /// Returns `LearnerdErrors` if either stop or start operations fail.
323 pub fn restart(&self) -> Result<()> {
324 self.stop()?;
325 std::thread::sleep(std::time::Duration::from_secs(1));
326 self.start()
327 }
328
329 /// Installs the daemon as a system service using platform-specific mechanisms.
330 ///

Callers 1

daemonFunction · 0.80

Calls 2

stopMethod · 0.80
startMethod · 0.80

Tested by

no test coverage detected