Skip to content

Commit

Permalink
Manually commit heartbeats and speedtests (#444)
Browse files Browse the repository at this point in the history
* Manually commit heartbeats and speedtests

* move dcommits to after the save last verified end time
  • Loading branch information
Matthew Plant authored Apr 13, 2023
1 parent d6aba47 commit c8e3501
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mobile_verifier/src/cli/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ impl Cmd {
concat!(env!("CARGO_PKG_NAME"), "_heartbeat"),
)
.deposits(Some(file_upload_tx.clone()))
.auto_commit(false)
.roll_time(Duration::minutes(15))
.create()
.await?;
Expand All @@ -52,6 +53,7 @@ impl Cmd {
concat!(env!("CARGO_PKG_NAME"), "_speedtest_average"),
)
.deposits(Some(file_upload_tx.clone()))
.auto_commit(false)
.roll_time(Duration::minutes(15))
.create()
.await?;
Expand Down
2 changes: 2 additions & 0 deletions mobile_verifier/src/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ impl VerifierDaemon {
}

save_last_verified_end_time(&mut transaction, &scheduler.verification_period.end).await?;
let _ = self.heartbeats.commit().await?.await??;
let _ = self.speedtest_avgs.commit().await?.await??;
transaction.commit().await?;

Ok(())
Expand Down

0 comments on commit c8e3501

Please sign in to comment.