From ba6e9eeb33c469fddc9e0e0fd6c9d0c1009e6e0e Mon Sep 17 00:00:00 2001 From: pippellia-btc Date: Sun, 14 Sep 2025 12:51:45 +0200 Subject: [PATCH] changed shutdown messages --- pkg/pipe/arbiter.go | 2 +- pkg/pipe/engine.go | 2 +- pkg/pipe/intake.go | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/pipe/arbiter.go b/pkg/pipe/arbiter.go index 2dcdb20..f28cdd7 100644 --- a/pkg/pipe/arbiter.go +++ b/pkg/pipe/arbiter.go @@ -60,7 +60,7 @@ func Arbiter(ctx context.Context, config ArbiterConfig, db redb.RedisDB, send fu for { select { case <-ctx.Done(): - log.Println("Arbiter: shutting down...") + log.Println("Arbiter: shut down") return case <-ticker.C: diff --git a/pkg/pipe/engine.go b/pkg/pipe/engine.go index c30f398..e1fc576 100644 --- a/pkg/pipe/engine.go +++ b/pkg/pipe/engine.go @@ -52,7 +52,7 @@ func Engine( defer close(graphEvents) log.Println("Engine: ready to process events") - defer log.Println("Engine: shutting down...") + defer log.Println("Engine: shut down") go GraphBuilder(ctx, config, db, graphEvents) diff --git a/pkg/pipe/intake.go b/pkg/pipe/intake.go index a7f7782..555d1d4 100644 --- a/pkg/pipe/intake.go +++ b/pkg/pipe/intake.go @@ -100,7 +100,7 @@ func (b *buffer) Contains(ID string) bool { // Firehose connects to a list of relays and pulls config.Kinds events that are newer than [FirehoseConfig.Since]. // It discards events from unknown pubkeys as an anti-spam mechanism. func Firehose(ctx context.Context, config FirehoseConfig, check PubkeyChecker, send func(*nostr.Event) error) { - defer log.Println("Firehose: shutting down...") + defer log.Println("Firehose: shut down") pool := nostr.NewSimplePool(ctx) defer shutdown(pool) @@ -162,7 +162,7 @@ func (c FetcherConfig) Print() { // - when the batch is bigger than config.Batch // - after config.Interval since the last query. func Fetcher(ctx context.Context, config FetcherConfig, pubkeys <-chan string, send func(*nostr.Event) error) { - defer log.Println("Fetcher: shutting down...") + defer log.Println("Fetcher: shut down") batch := make([]string, 0, config.Batch) timer := time.After(config.Interval) @@ -262,7 +262,7 @@ func FetcherDB( pubkeys <-chan string, send func(*nostr.Event) error) { - defer log.Println("FetcherDB: shutting down...") + defer log.Println("FetcherDB: shut down") batch := make([]string, 0, config.Batch) timer := time.After(config.Interval)