Unverified Commit cbf032a5 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

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

parents 52c8b991 ad5cdf4a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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 = [