From 052fce5bf2b1995fe45b88626e5342e61933d7cd Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 23 May 2024 13:22:50 +0200 Subject: refactor: use a single value for per-source import timeouts --- internal/importer/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/importer/main.go') 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) -- cgit 1.4.1