all repos — searchix @ ea8c3053006e67210e16ed55febbcb0c6a374b54

Search engine for NixOS, nix-darwin, home-manager and NUR users

refactor: split importer args

Alan Pearce
commit

ea8c3053006e67210e16ed55febbcb0c6a374b54

parent

3ee8248656c089594ea8a3be41945c408ab39aa4

1 file changed, 6 insertions(+), 9 deletions(-)

changed files
M searchix.gosearchix.go
@@ -77,11 +77,9 @@ options.Replace,
"update", options.Update, ) - err = importer.Start( + imp := importer.New(s.cfg, s.log.Named("importer"), write) + err = imp.Start( ctx, - s.cfg, - s.log.Named("importer"), - write, options.Replace || options.Update, nil, )
@@ -106,11 +104,9 @@ return slices.Contains(cfgEnabledSources, s)
}) if len(newSources) > 0 { s.log.Info("adding new sources", "sources", newSources) - err := importer.Start( + imp := importer.New(s.cfg, options.Logger.Named("importer"), write) + err := imp.Start( ctx, - s.cfg, - options.Logger.Named("importer"), - write, false, &newSources, )
@@ -197,7 +193,8 @@ MonitorSlug: monitorSlug,
Status: sentry.CheckInStatusInProgress, }, monitorConfig) - err = importer.Start(ctx, s.cfg, s.log.Named("importer"), s.writeIndex, false, nil) + imp := importer.New(s.cfg, s.log.Named("importer"), s.writeIndex) + err = imp.Start(ctx, false, nil) s.wg.Done() if err != nil { s.log.Warn("error updating index", "error", err)