diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-06-10 22:01:45 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-06-10 22:01:45 +0200 |
| commit | 5e31a81cd2207f053b8cd8ad84ebe2a2f691b29d (patch) | |
| tree | 5d76811ab0d693c01fa472d41aa2ceaf3bd0b415 /crates/atuin-daemon/src/components/sync.rs | |
| parent | chore: Remove unneeded files (diff) | |
| download | atuin-5e31a81cd2207f053b8cd8ad84ebe2a2f691b29d.zip | |
chore: Remove some unused rust code
Diffstat (limited to 'crates/atuin-daemon/src/components/sync.rs')
| -rw-r--r-- | crates/atuin-daemon/src/components/sync.rs | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/crates/atuin-daemon/src/components/sync.rs b/crates/atuin-daemon/src/components/sync.rs index a342f700..6e486250 100644 --- a/crates/atuin-daemon/src/components/sync.rs +++ b/crates/atuin-daemon/src/components/sync.rs @@ -10,7 +10,6 @@ use tokio::sync::mpsc; use tokio::time::{self, MissedTickBehavior}; use atuin_client::{history::store::HistoryStore, record::sync, settings::Settings}; -use atuin_dotfiles::store::{AliasStore, var::VarStore}; use crate::{ daemon::{Component, DaemonHandle}, @@ -123,8 +122,6 @@ async fn sync_loop(handle: DaemonHandle, mut cmd_rx: mpsc::Receiver<SyncCommand> // Create the stores we need let encryption_key = *handle.encryption_key(); let history_store = HistoryStore::new(handle.store().clone(), host_id, encryption_key); - let alias_store = AliasStore::new(handle.store().clone(), host_id, encryption_key); - let var_store = VarStore::new(handle.store().clone(), host_id, encryption_key); // Don't backoff by more than 30 mins (with a random jitter of up to 1 min) let max_interval: f64 = 60.0 * 30.0 + rand::thread_rng().gen_range(0.0..60.0); @@ -152,8 +149,6 @@ async fn sync_loop(handle: DaemonHandle, mut cmd_rx: mpsc::Receiver<SyncCommand> sync_state = do_sync_tick( &handle, &history_store, - &alias_store, - &var_store, &mut ticker, max_interval, &settings, @@ -167,8 +162,6 @@ async fn sync_loop(handle: DaemonHandle, mut cmd_rx: mpsc::Receiver<SyncCommand> sync_state = do_sync_tick( &handle, &history_store, - &alias_store, - &var_store, &mut ticker, max_interval, &settings, @@ -190,8 +183,6 @@ async fn sync_loop(handle: DaemonHandle, mut cmd_rx: mpsc::Receiver<SyncCommand> async fn do_sync_tick( handle: &DaemonHandle, history_store: &HistoryStore, - alias_store: &AliasStore, - var_store: &VarStore, ticker: &mut time::Interval, max_interval: f64, settings: &Settings, @@ -267,14 +258,6 @@ async fn do_sync_tick( downloaded: downloaded_records.len(), }); - // Rebuild alias and var stores - if let Err(e) = alias_store.build().await { - tracing::error!("failed to rebuild alias store: {e}"); - } - if let Err(e) = var_store.build().await { - tracing::error!("failed to rebuild var store: {e}"); - } - // Reset backoff on success if ticker.period().as_secs() != settings.daemon.sync_frequency { *ticker = time::interval_at( |
