atuin/src/command/sync.rs
Ellie Huxtable a21737e2b7
Use cargo workspaces ()
* Switch to Cargo workspaces

Breaking things into "client", "server" and "common" makes managing the
codebase much easier!

client - anything running on a user's machine for adding history
server - handles storing/syncing history and running a HTTP server
common - request/response API definitions, common utils, etc

* Update dockerfile
2021-04-20 20:53:07 +00:00

15 lines
399 B
Rust

use eyre::Result;
use atuin_client::database::Database;
use atuin_client::settings::Settings;
use atuin_client::sync;
pub async fn run(settings: &Settings, force: bool, db: &mut (impl Database + Send)) -> Result<()> {
sync::sync(settings, force, db).await?;
println!(
"Sync complete! {} items in database, force: {}",
db.history_count()?,
force
);
Ok(())
}