bcacheup: slow down rate of output
This commit is contained in:
parent
9d16934db3
commit
955b899bca
1 changed files with 4 additions and 3 deletions
|
@ -32,6 +32,7 @@ import (
|
||||||
var (
|
var (
|
||||||
blobURLFlag = flag.String("cache_url", "", "Cache URL")
|
blobURLFlag = flag.String("cache_url", "", "Cache URL")
|
||||||
storeDBFlag = flag.String("nix_store_db", nixstore.DefaultStoreDB, "Path to the nix store database")
|
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 (
|
var (
|
||||||
|
@ -433,7 +434,7 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
t := time.NewTicker(1 * time.Second)
|
t := time.NewTicker(*stateSummaryIntervalFlag)
|
||||||
defer t.Stop()
|
defer t.Stop()
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
|
|
Loading…
Reference in a new issue