Skip to content

Commit ed15ff5

Browse files
committed
refactor: renamed wait_for_server to wait_for_start (same as in aw-client-python)
1 parent 4723f32 commit ed15ff5

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

aw-client-rust/src/blocking.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl AwClient {
8080
proxy_method!(get_event_count, i64, bucketname: &str);
8181
proxy_method!(get_info, aw_models::Info,);
8282

83-
pub fn wait_for_server(&self) -> Result<(), Box<dyn Error>> {
84-
self.client.wait_for_server()
83+
pub fn wait_for_start(&self) -> Result<(), Box<dyn Error>> {
84+
self.client.wait_for_start()
8585
}
8686
}

aw-client-rust/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ impl AwClient {
225225
}
226226

227227
// TODO: make async
228-
pub fn wait_for_server(&self) -> Result<(), Box<dyn Error>> {
228+
pub fn wait_for_start(&self) -> Result<(), Box<dyn Error>> {
229229
let socket_addrs = self.baseurl.socket_addrs(|| None)?;
230230
let socket_addr = socket_addrs.first()
231231
.ok_or("Unable to resolve baseurl into socket address")?;

aw-sync/src/sync_wrapper.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
use std::error::Error;
22
use std::fs;
3-
use std::net::TcpStream;
4-
use std::time::Duration;
53

64
use crate::sync::{sync_run, SyncMode, SyncSpec};
75
use aw_client_rust::blocking::AwClient;
@@ -15,7 +13,7 @@ pub fn pull_all(client: &AwClient) -> Result<(), Box<dyn Error>> {
1513
}
1614

1715
pub fn pull(host: &str, client: &AwClient) -> Result<(), Box<dyn Error>> {
18-
client.wait_for_server()?;
16+
client.wait_for_start()?;
1917

2018
// Path to the sync folder
2119
// Sync folder is structured ./{hostname}/{device_id}/test.db

0 commit comments

Comments
 (0)