Skip to content

Commit 13e72f1

Browse files
committed
expose quorum tick ms
1 parent a41eb1c commit 13e72f1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,10 @@ impl Lighthouse {
230230
bind: String,
231231
min_replicas: u64,
232232
join_timeout_ms: Option<u64>,
233+
quorum_tick_ms: Option<u64>,
233234
) -> PyResult<Self> {
234235
let join_timeout_ms = join_timeout_ms.unwrap_or(100);
236+
let quorum_tick_ms = quorum_tick_ms.unwrap_or(100);
235237

236238
py.allow_threads(move || {
237239
let rt = Runtime::new()?;
@@ -241,7 +243,7 @@ impl Lighthouse {
241243
bind: bind,
242244
min_replicas: min_replicas,
243245
join_timeout_ms: join_timeout_ms,
244-
quorum_tick_ms: 100,
246+
quorum_tick_ms: quorum_tick_ms,
245247
}))
246248
.map_err(|e| PyRuntimeError::new_err(e.to_string()))?;
247249

torchft/torchft.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ class Manager:
2323
def shutdown(self) -> None: ...
2424

2525
class Lighthouse:
26-
def __init__(self, bind: str, min_replicas: int, join_timeout_ms: Optional[int] = None) -> None: ...
26+
def __init__(self, bind: str, min_replicas: int, join_timeout_ms: Optional[int] = None, quorum_tick_ms: Optional[int] = None) -> None: ...
2727
def address(self) -> str: ...
2828
def shutdown(self) -> None: ...

0 commit comments

Comments
 (0)