mirror of
https://github.com/aljazceru/crawler_v2.git
synced 2025-12-17 07:24:21 +01:00
print stats only when config allows
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user