paperless-ngx: fix tests on machines with more than 256 cores (#439998)

This commit is contained in:
Sandro
2025-09-04 15:10:21 +02:00
committed by GitHub
@@ -315,6 +315,10 @@ python.pkgs.buildPythonApplication rec {
export HOME=$(mktemp -d)
export XDG_DATA_DIRS="${liberation_ttf}/share:$XDG_DATA_DIRS"
export PAPERLESS_NLTK_DIR=${passthru.nltkDataDir}
# Limit threads per worker based on NIX_BUILD_CORES, capped at 256
# ocrmypdf has an internal limit of 256 jobs and will fail with more:
# https://github.com/ocrmypdf/OCRmyPDF/blob/66308c281306302fac3470f587814c3b212d0c40/src/ocrmypdf/cli.py#L234
export PAPERLESS_THREADS_PER_WORKER=$(( NIX_BUILD_CORES > 256 ? 256 : NIX_BUILD_CORES ))
'';
disabledTests = [