about summary refs log tree commit diff stats
path: root/internal
diff options
context:
space:
mode:
authorAlan Pearce2025-03-24 17:18:18 +0100
committerAlan Pearce2025-03-24 17:18:18 +0100
commit41d40588457290477d87346a133be72be6c621cb (patch)
tree315a3527234fec652b7ff15ad425c137203634cf /internal
parent0fb48cf6dd934778584120ebbc9e568c8b80b80e (diff)
downloadsearchix-41d40588457290477d87346a133be72be6c621cb.tar.lz
searchix-41d40588457290477d87346a133be72be6c621cb.tar.zst
searchix-41d40588457290477d87346a133be72be6c621cb.zip
refactor: pass indexer to importer only once in options
Diffstat (limited to 'internal')
-rw-r--r--internal/importer/main.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/internal/importer/main.go b/internal/importer/main.go
index 71606e9..5b48007 100644
--- a/internal/importer/main.go
+++ b/internal/importer/main.go
@@ -244,7 +244,6 @@ func New(
 func (imp *Importer) EnsureSourcesIndexed(
 	ctx context.Context,
 	read *index.ReadIndex,
-	write *index.WriteIndex,
 ) errors.E {
 	cfgEnabledSources := slices.Collect(maps.Keys(imp.config.Importer.Sources))
 	slices.Sort(cfgEnabledSources)
@@ -275,7 +274,7 @@ func (imp *Importer) EnsureSourcesIndexed(
 		if len(retiredSources) > 0 {
 			imp.log.Info("removing retired sources", "sources", retiredSources)
 			for _, s := range retiredSources {
-				err := write.DeleteBySource(s)
+				err := imp.indexer.DeleteBySource(s)
 				if err != nil {
 					return errors.Wrapf(err, "Failed to remove retired source %s", s)
 				}