From 955b899bcae882d1a829c8df5e778a9ee05e6f6a Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sun, 9 Oct 2022 18:10:46 +0100 Subject: [PATCH] bcacheup: slow down rate of output --- go/nix/bcacheup/bcacheup.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/go/nix/bcacheup/bcacheup.go b/go/nix/bcacheup/bcacheup.go index 370a38b29a..f2a9cc5d04 100644 --- a/go/nix/bcacheup/bcacheup.go +++ b/go/nix/bcacheup/bcacheup.go @@ -30,8 +30,9 @@ import ( ) var ( - blobURLFlag = flag.String("cache_url", "", "Cache URL") - storeDBFlag = flag.String("nix_store_db", nixstore.DefaultStoreDB, "Path to the nix store database") + blobURLFlag = flag.String("cache_url", "", "Cache URL") + storeDBFlag = flag.String("nix_store_db", nixstore.DefaultStoreDB, "Path to the nix store database") + stateSummaryIntervalFlag = flag.Interval("state_summary_interval", 10*time.Second, "Time between state summary outputs.") ) var ( @@ -433,7 +434,7 @@ func main() { } go func() { - t := time.NewTicker(1 * time.Second) + t := time.NewTicker(*stateSummaryIntervalFlag) defer t.Stop() for { select {