about summary refs log tree commit diff stats
path: root/internal/importer/main.go
diff options
context:
space:
mode:
authorAlan Pearce2025-01-23 14:54:12 +0100
committerAlan Pearce2025-01-24 13:04:41 +0100
commit200857159766d3c6c5831450048348444c5666f4 (patch)
tree36fb6ebbbc91e609106c8f199e01cf00ab830c3f /internal/importer/main.go
parent7496bb7e0652d86e2afd05d35e6632dab27c954a (diff)
downloadsearchix-200857159766d3c6c5831450048348444c5666f4.tar.lz
searchix-200857159766d3c6c5831450048348444c5666f4.tar.zst
searchix-200857159766d3c6c5831450048348444c5666f4.zip
perf: pass context to importer for better tracing
Diffstat (limited to 'internal/importer/main.go')
-rw-r--r--internal/importer/main.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/importer/main.go b/internal/importer/main.go
index dfa2477..2af1666 100644
--- a/internal/importer/main.go
+++ b/internal/importer/main.go
@@ -144,6 +144,7 @@ func createSourceImporter(
 }
 
 func Start(
+	ctx context.Context,
 	cfg *config.Config,
 	log *log.Logger,
 	indexer *index.WriteIndex,
@@ -158,7 +159,7 @@ func Start(
 
 	log.Debug("starting importer", "timeout", cfg.Importer.Timeout.Duration)
 	importCtx, cancelImport := context.WithTimeout(
-		context.Background(),
+		ctx,
 		cfg.Importer.Timeout.Duration,
 	)
 	defer cancelImport()