]> Sergey Matveev's repositories - public-inbox.git/commitdiff
v2writable: fix brainfart when capping NPROC_MAX_DEFAULT
authorEric Wong <e@80x24.org>
Fri, 14 Jun 2019 21:43:16 +0000 (21:43 +0000)
committerEric Wong <e@80x24.org>
Fri, 14 Jun 2019 21:43:16 +0000 (21:43 +0000)
Oops :x

lib/PublicInbox/V2Writable.pm

index 3329d79fa77b56690be7cd45bac12b9fa53674c6..76e61e86931078c41e5999d912efd521df8334bf 100644 (file)
@@ -44,7 +44,7 @@ sub nproc_parts ($) {
                chomp($n = `nproc 2>/dev/null`);
                # assume 2 cores if GNU nproc(1) is not available
                $n = 2 if !$n;
-               $n = $NPROC_MAX_DEFAULT if $NPROC_MAX_DEFAULT > 4;
+               $n = $NPROC_MAX_DEFAULT if $n > $NPROC_MAX_DEFAULT;
        }
 
        # subtract for the main process and git-fast-import