aboutsummaryrefslogtreecommitdiff
path: root/internal/postgres/requeue.go
diff options
context:
space:
mode:
authorJonathan Amsterdam <jba@google.com>2020-09-23 11:39:15 -0400
committerJonathan Amsterdam <jba@google.com>2020-09-23 21:23:01 +0000
commitaba2fde2aef54a6603fcbeb85a0161c35d9c5014 (patch)
treefd73a7de57d295cec2b030a74216c1cc0d6d9a39 /internal/postgres/requeue.go
parent87e3f51b073ae1e1f981abf1363e2a012c272421 (diff)
downloadgo-x-pkgsite-aba2fde2aef54a6603fcbeb85a0161c35d9c5014.tar.xz
internal/postgres: make large modules limit configurable
Change-Id: Iafeb3727f1d48ed37d10d64db6e39f26db590f29 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/256761 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
Diffstat (limited to 'internal/postgres/requeue.go')
-rw-r--r--internal/postgres/requeue.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/postgres/requeue.go b/internal/postgres/requeue.go
index 68ab82c1..4cc2c9ab 100644
--- a/internal/postgres/requeue.go
+++ b/internal/postgres/requeue.go
@@ -12,6 +12,7 @@ import (
"strconv"
"golang.org/x/pkgsite/internal"
+ "golang.org/x/pkgsite/internal/config"
"golang.org/x/pkgsite/internal/derrors"
"golang.org/x/pkgsite/internal/log"
)
@@ -61,7 +62,7 @@ const largeModulePackageThreshold = 1500
// largeModulesLimit represents the number of large modules that we are
// willing to enqueue at a given time.
// var for testing.
-var largeModulesLimit = 100
+var largeModulesLimit = config.GetEnvInt("GO_DISCOVERY_LARGE_MODULES_LIMIT", 100)
// GetNextModulesToFetch returns the next batch of modules that need to be
// processed. We prioritize modules based on (1) whether it has status zero