all repos — searchix @ a5e758d41c151c17ed03b39454470ba8dd0c3b99

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

refactor: separate fetch and import logic

Alan Pearce
commit

a5e758d41c151c17ed03b39454470ba8dd0c3b99

parent

d558039919b6198a246a6a3fd007276191cb4b2f

1 file changed, 3 insertions(+), 3 deletions(-)

changed files
M internal/importer/ingest.gointernal/importer/options.go
@@ -91,9 +91,8 @@
return &i, nil } -func (i *OptionIngester) Process( - ctx context.Context, -) (<-chan nix.Importable, <-chan error) { +func (i *OptionIngester) Process(parent context.Context) (<-chan nix.Importable, <-chan error) { + ctx, cancel := context.WithTimeout(parent, i.source.ImportTimeout) results := make(chan nix.Importable) errs := make(chan error)
@@ -101,6 +100,7 @@ go func() {
defer i.infile.Close() defer close(results) defer close(errs) + defer cancel() slog.Debug("starting decoder stream") outer: