mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
implement a local sync server
This commit is contained in:
parent
8f7e2e2790
commit
3537db9bbe
9 changed files with 249 additions and 72 deletions
|
@ -51,7 +51,9 @@ impl CommandInvocation {
|
|||
))
|
||||
}
|
||||
|
||||
pub(super) fn get_server(&self) -> impl server::Server {
|
||||
server::LocalServer::new()
|
||||
pub(super) fn get_server(&self) -> Fallible<impl server::Server> {
|
||||
Ok(server::LocalServer::new(Path::new(
|
||||
"/tmp/task-sync-server",
|
||||
))?)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ define_subcommand! {
|
|||
subcommand_invocation! {
|
||||
fn run(&self, command: &CommandInvocation) -> Fallible<()> {
|
||||
let mut replica = command.get_replica();
|
||||
let mut server = command.get_server();
|
||||
let mut server = command.get_server()?;
|
||||
replica.sync(&mut server)?;
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue