* 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
15 lines
399 B
Rust
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(())
|
|
}
|