From 94d52f7a1c2e595c397a9018fd342b8ec7d7c35f Mon Sep 17 00:00:00 2001 From: pippellia-btc Date: Mon, 16 Jun 2025 16:09:18 +0200 Subject: [PATCH] print stats only when config allows --- cmd/crawler/main.go | 4 +++- cmd/sync/main.go | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/crawler/main.go b/cmd/crawler/main.go index 2042d79..c10d6f8 100644 --- a/cmd/crawler/main.go +++ b/cmd/crawler/main.go @@ -73,7 +73,9 @@ func main() { log.Printf("correctly added %d init pubkeys", len(config.InitPubkeys)) } - go printStats(ctx, events, pubkeys) + if config.PrintStats { + go printStats(ctx, events, pubkeys) + } var producers sync.WaitGroup var consumers sync.WaitGroup diff --git a/cmd/sync/main.go b/cmd/sync/main.go index fd64a60..cd890ef 100644 --- a/cmd/sync/main.go +++ b/cmd/sync/main.go @@ -78,7 +78,9 @@ func main() { nostr.KindFollowList, // no need to sync other event kinds } - go printStats(ctx, events, pubkeys) + if config.PrintStats { + go printStats(ctx, events, pubkeys) + } var wg sync.WaitGroup wg.Add(3)