Skip to content

Commit

Permalink
Use 5 second delay for initial sync (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
ligustah authored Apr 26, 2024
2 parents 0e033b1 + e14ad42 commit 03b4c6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ RUN --mount=type=bind,source=justfile,target=justfile \
cargo install just && just ci

RUN --mount=type=bind,source=src,target=src \
--mount=type=bind,source=.git,target=.git \
--mount=type=bind,source=data,target=data \
--mount=type=bind,source=contracts,target=contracts \
--mount=type=bind,source=Cargo.toml,target=Cargo.toml \
--mount=type=bind,source=Cargo.lock,target=Cargo.lock \
--mount=type=cache,target=/app/target/ \
--mount=type=cache,target=/usr/local/cargo/registry/ \
--mount=type=bind,source=migrations,target=/app/migrations \
--mount=type=bind,source=build.rs,target=build.rs \
<<EOF
set -e
cargo build --locked --release
Expand Down
4 changes: 2 additions & 2 deletions src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ impl Controller {
store: PremintStorage,
rules: RulesEngine<PremintStorage>,
) -> Self {
// sync every 60 minutes, also sync 30 seconds after startup (gives some time to connect to peers)
// sync every 60 minutes, also sync 5 seconds after startup (gives some time to connect to peers)
let sync_ticker =
Ticker::new_with_next(Duration::from_secs(60 * 60), Duration::from_secs(30));
Ticker::new_with_next(Duration::from_secs(60 * 60), Duration::from_secs(5));

Self {
swarm_command_sender,
Expand Down

0 comments on commit 03b4c6c

Please sign in to comment.