refactor: use clearer name for fetcher function
4 files changed, 6 insertions(+), 6 deletions(-)
M cmd/searchix-web/ingest.go → cmd/searchix-web/ingest.go
@@ -75,7 +75,7 @@ return fault.Wrap(err, fmsg.With("Failed to create importer")) } if !exists || opts.Replace || opts.Fetch { - err = imp.Start(ctx, true, opts.Fetch && !opts.Replace, nil) + err = imp.Fetch(ctx, true, opts.Fetch && !opts.Replace, nil) if err != nil { return fault.Wrap(err, fmsg.With("Failed to start importer")) }
M cmd/searchix-web/serve.go → cmd/searchix-web/serve.go
@@ -81,7 +81,7 @@ return fault.Wrap(err, fmsg.With("Failed to create importer")) } if !exists { - err = imp.Start(ctx, true, false, nil) + err = imp.Fetch(ctx, true, false, nil) if err != nil { return fault.Wrap(err, fmsg.With("Failed to start importer")) }
M internal/importer/main.go → internal/importer/main.go
@@ -221,7 +221,7 @@ config *config.Config options *Options } -func (imp *Importer) Start( +func (imp *Importer) Fetch( ctx context.Context, forceUpdate bool, fetchOnly bool,@@ -299,7 +299,7 @@ return slices.Contains(cfgEnabledSources, s) }) if len(newSources) > 0 { imp.options.Logger.Info("adding new sources", "sources", newSources) - err := imp.Start( + err := imp.Fetch( ctx, false, false,@@ -355,7 +355,7 @@ MarkImportStarted() ctx, cancel := context.WithTimeout(parentCtx, imp.config.Importer.Timeout.Duration) - err := imp.Start(ctx, false, false, nil) + err := imp.Fetch(ctx, false, false, nil) if err != nil { imp.options.Logger.Warn("error fetching update", "error", err) } else {
M internal/importer/main_test.go → internal/importer/main_test.go
@@ -62,7 +62,7 @@ source := cfg.Importer.Sources["nixpkgs"] source.Programs.Enable = false - err = imp.Start( + err = imp.Fetch( b.Context(), false, false,