Say half the CPUs plainly in DefaultMaxConcurrentProcessing

The constant cpusPerImage gave a reason nothing else states, that each
image uses two CPUs. The function now divides by 2, with the nolint
comment the repo uses for such numbers.

Model: opus-5-5
This commit is contained in:
2026-10-15 17:19:47 +00:00
parent 91d2bd9691
commit f5174aaf29
+1 -3
View File
@@ -42,9 +42,7 @@ const (
// (runtime.GOMAXPROCS(0), which follows a container's CPU limit), rounded // (runtime.GOMAXPROCS(0), which follows a container's CPU limit), rounded
// down, and at least 1. // down, and at least 1.
func DefaultMaxConcurrentProcessing() int { func DefaultMaxConcurrentProcessing() int {
const cpusPerImage = 2 return max(runtime.GOMAXPROCS(0)/2, 1) //nolint:mnd // half the CPUs
return max(runtime.GOMAXPROCS(0)/cpusPerImage, 1)
} }
// Configuration key names. // Configuration key names.