mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
use StorageConfig instead of ReplicaConfig
This commit is contained in:
parent
b004b6cb93
commit
02d9c577ab
6 changed files with 30 additions and 21 deletions
|
@ -3,7 +3,7 @@
|
|||
use crate::argparse::{Command, Subcommand};
|
||||
use config::Config;
|
||||
use failure::{format_err, Fallible};
|
||||
use taskchampion::{Replica, ReplicaConfig, Server, ServerConfig, Uuid};
|
||||
use taskchampion::{Replica, Server, ServerConfig, StorageConfig, Uuid};
|
||||
use termcolor::{ColorChoice, StandardStream};
|
||||
|
||||
mod cmd;
|
||||
|
@ -104,8 +104,8 @@ pub(crate) fn invoke(command: Command, settings: Config) -> Fallible<()> {
|
|||
fn get_replica(settings: &Config) -> Fallible<Replica> {
|
||||
let taskdb_dir = settings.get_str("data_dir")?.into();
|
||||
log::debug!("Replica data_dir: {:?}", taskdb_dir);
|
||||
let replica_config = ReplicaConfig { taskdb_dir };
|
||||
Ok(Replica::from_config(replica_config)?)
|
||||
let storage_config = StorageConfig::OnDisk { taskdb_dir };
|
||||
Ok(Replica::new(storage_config.into_storage()?))
|
||||
}
|
||||
|
||||
/// Get the server for this invocation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue