about summary refs log tree commit diff stats
path: root/internal/importer/options.go
diff options
context:
space:
mode:
authorAlan Pearce2024-05-23 13:22:50 +0200
committerAlan Pearce2024-05-23 13:22:50 +0200
commit052fce5bf2b1995fe45b88626e5342e61933d7cd (patch)
treee3c9b49250acee26c6aee1d43501c1cdddb83fc6 /internal/importer/options.go
parent0dbfe37fbddb95c184d845c79bbe014597d55fe8 (diff)
downloadsearchix-052fce5bf2b1995fe45b88626e5342e61933d7cd.tar.lz
searchix-052fce5bf2b1995fe45b88626e5342e61933d7cd.tar.zst
searchix-052fce5bf2b1995fe45b88626e5342e61933d7cd.zip
refactor: use a single value for per-source import timeouts
Diffstat (limited to 'internal/importer/options.go')
-rw-r--r--internal/importer/options.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/internal/importer/options.go b/internal/importer/options.go
index 4089f62..c26836e 100644
--- a/internal/importer/options.go
+++ b/internal/importer/options.go
@@ -87,8 +87,7 @@ func NewOptionProcessor(infile io.ReadCloser, source *config.Source) (*OptionIng
 	return &i, nil
 }
 
-func (i *OptionIngester) Process(parent context.Context) (<-chan nix.Importable, <-chan error) {
-	ctx, cancel := context.WithTimeout(parent, i.source.ImportTimeout.Duration)
+func (i *OptionIngester) Process(ctx context.Context) (<-chan nix.Importable, <-chan error) {
 	results := make(chan nix.Importable)
 	errs := make(chan error)
 
@@ -96,7 +95,6 @@ func (i *OptionIngester) Process(parent context.Context) (<-chan nix.Importable,
 		defer i.infile.Close()
 		defer close(results)
 		defer close(errs)
-		defer cancel()
 
 	outer:
 		for mv := range i.dec.Stream() {