]> Sergey Matveev's repositories - public-inbox.git/blobdiff - script/public-inbox-index
mda: allow configuring globally without spamc support
[public-inbox.git] / script / public-inbox-index
index db7ebbab6421ec2cc1b849e4259b2ac82d6d745b..e487e3fe327f69080e29996bb934a3cd219f46f8 100755 (executable)
@@ -101,7 +101,7 @@ sub index_dir {
                eval { require PublicInbox::V2Writable };
                die "v2 requirements not met: $@\n" if $@;
                my $v2w = eval {
-                       local $ENV{NPROC} = $jobs if $jobs;
+                       $jobs and local $ENV{NPROC} = $jobs;
                        PublicInbox::V2Writable->new($repo);
                };
                if (defined $jobs) {
@@ -109,7 +109,7 @@ sub index_dir {
                                $v2w->{parallel} = 0;
                        } else {
                                my $n = $v2w->{partitions};
-                               if ($jobs != $n) {
+                               if ($jobs != ($n + 1)) {
                                        warn
 "Unable to respect --jobs=$jobs, inbox was created with $n partitions\n";
                                }