Skip to content

Commit

Permalink
Election can start more lazily
Browse files Browse the repository at this point in the history
  • Loading branch information
akiradeveloper committed Nov 2, 2024
1 parent 768c125 commit 3bdd606
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sorock/src/process/thread/election.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl Thread {

fn do_loop(self) -> ThreadHandle {
let fut = async move {
let mut interval = tokio::time::interval(Duration::from_millis(300));
let mut interval = tokio::time::interval(Duration::from_secs(1));
loop {
interval.tick().await;
self.run_once().await.ok();
Expand Down
2 changes: 1 addition & 1 deletion sorock/src/process/thread/stepdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl Thread {

pub fn do_loop(self) -> ThreadHandle {
let fut = async move {
let mut interval = tokio::time::interval(Duration::from_millis(300));
let mut interval = tokio::time::interval(Duration::from_secs(1));
loop {
interval.tick().await;
self.run_once().await.ok();
Expand Down

0 comments on commit 3bdd606

Please sign in to comment.