aboutsummaryrefslogtreecommitdiffstats
path: root/crates/turtle/src/atuin_daemon/daemon.rs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-06-12 17:16:19 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-06-12 17:16:19 +0200
commit2ca7dd57b12861e8c9bbc9238cda612e0ff22ff3 (patch)
tree302a644f6a50d60cc8304c4498fe6bbb72ddaaa9 /crates/turtle/src/atuin_daemon/daemon.rs
parentfeat(server): Really make users stateless (with tests) (diff)
downloadatuin-2ca7dd57b12861e8c9bbc9238cda612e0ff22ff3.zip
chore(treewide): Cleanup themes
Diffstat (limited to 'crates/turtle/src/atuin_daemon/daemon.rs')
-rw-r--r--crates/turtle/src/atuin_daemon/daemon.rs28
1 files changed, 3 insertions, 25 deletions
diff --git a/crates/turtle/src/atuin_daemon/daemon.rs b/crates/turtle/src/atuin_daemon/daemon.rs
index 7583c197..80aaeef8 100644
--- a/crates/turtle/src/atuin_daemon/daemon.rs
+++ b/crates/turtle/src/atuin_daemon/daemon.rs
@@ -113,17 +113,7 @@ impl DaemonHandle {
self.state.settings.read().await
}
- /// Reload settings from disk and emit a SettingsReloaded event.
- ///
- /// Components listening for `SettingsReloaded` can then re-read settings
- /// via `handle.settings()` to pick up the changes.
- pub(crate) async fn reload_settings(&self) -> Result<()> {
- let new_settings = Settings::new()?;
- self.apply_settings(new_settings).await;
- Ok(())
- }
-
- /// Apply already-loaded settings and emit a SettingsReloaded event.
+ /// Apply already-loaded settings and emit a [`SettingsReloaded`] event.
///
/// Use this when settings have already been loaded (e.g., from a file watcher)
/// to avoid parsing the config file twice.
@@ -292,7 +282,7 @@ impl Daemon {
/// Run the daemon event loop.
///
- /// This processes events until a ShutdownRequested event is received.
+ /// This processes events until a [`ShutdownRequested`] event is received.
/// Components must be started first via `start_components()`.
pub(crate) async fn run_event_loop(&mut self) -> Result<()> {
let mut event_rx = self.handle.subscribe();
@@ -338,18 +328,6 @@ impl Daemon {
tracing::info!("all components stopped");
}
- /// Run the daemon.
- ///
- /// This is a convenience method that starts components, runs the event loop,
- /// and handles shutdown. It does not return until the daemon is shut down.
- pub(crate) async fn run(mut self) -> Result<()> {
- self.start_components().await?;
- self.run_event_loop().await?;
- self.stop_components().await;
- tracing::info!("daemon stopped");
- Ok(())
- }
-
async fn dispatch_event(&mut self, event: &DaemonEvent) {
for component in &mut self.components {
if let Err(e) = component.handle_event(event).await {
@@ -424,7 +402,7 @@ impl DaemonBuilder {
/// Build the daemon.
///
/// This loads the encryption key and creates the daemon state.
- pub(crate) async fn build(self) -> Result<Daemon> {
+ pub(crate) fn build(self) -> Result<Daemon> {
let store = self.store.ok_or_else(|| eyre::eyre!("store is required"))?;
let history_db = self
.history_db