Skip to content

Commit

Permalink
replaced time.Sleep in main loop with ticker
Browse files Browse the repository at this point in the history
Signed-off-by: Georgios Ntoutsos <gntouts@nubificus.co.uk>
  • Loading branch information
gntouts committed Jul 11, 2023
1 parent 8c9d76b commit 531cae1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/verifier/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ func main() {
// 1. Fetch latest checkpoint and verify
// 2. If old checkpoint is present, verify consistency proof
// 3. Write latest checkpoint to file
for {
ticker := time.NewTicker(*interval)
for range ticker.C {
logInfo, err := rekor.GetLogInfo(context.Background(), rekorClient)
if err != nil {
log.Fatalf("Getting log info: %v", err)
Expand Down Expand Up @@ -185,6 +186,5 @@ func main() {
if *once {
return
}
time.Sleep(*interval)
}
}

0 comments on commit 531cae1

Please sign in to comment.