From bfcf5d06b935ca30c760a6178afe916bbdfbfe49 Mon Sep 17 00:00:00 2001 From: Brian Olson Date: Fri, 29 Nov 2024 10:53:48 -0500 Subject: [PATCH] fix Shutdown for test --- indexer/indexer.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indexer/indexer.go b/indexer/indexer.go index 7442f9f4..91f5a1b4 100644 --- a/indexer/indexer.go +++ b/indexer/indexer.go @@ -81,7 +81,9 @@ func NewIndexer(db *gorm.DB, notifman notifs.NotificationManager, evtman *events } func (ix *Indexer) Shutdown() { - ix.Crawler.Shutdown() + if ix.Crawler != nil { + ix.Crawler.Shutdown() + } } func (ix *Indexer) HandleRepoEvent(ctx context.Context, evt *repomgr.RepoEvent) error {