diff options
author | Alan Pearce | 2024-05-23 13:22:50 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-23 13:22:50 +0200 |
commit | 052fce5bf2b1995fe45b88626e5342e61933d7cd (patch) | |
tree | e3c9b49250acee26c6aee1d43501c1cdddb83fc6 /internal/importer/main.go | |
parent | 0dbfe37fbddb95c184d845c79bbe014597d55fe8 (diff) | |
download | searchix-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/main.go')
-rw-r--r-- | internal/importer/main.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/importer/main.go b/internal/importer/main.go index 6be5b45..bd41af2 100644 --- a/internal/importer/main.go +++ b/internal/importer/main.go @@ -28,7 +28,7 @@ func createSourceImporter( "fetcher", source.Fetcher.String(), "timeout", - source.FetchTimeout.Duration, + source.Timeout.Duration, ) logger.Debug("starting fetcher") @@ -42,7 +42,7 @@ func createSourceImporter( sourceMeta.Updated = time.Time{} } previousUpdate := sourceMeta.Updated - ctx, cancel := context.WithTimeout(parent, source.FetchTimeout.Duration) + ctx, cancel := context.WithTimeout(parent, source.Timeout.Duration) defer cancel() files, err := fetcher.FetchIfNeeded(ctx, &sourceMeta) |