]> Sergey Matveev's repositories - public-inbox.git/commitdiff
admin: don't warn when --jobs exceeds shards
authorEric Wong <e@yhbt.net>
Wed, 12 Aug 2020 09:17:17 +0000 (09:17 +0000)
committerEric Wong <e@yhbt.net>
Thu, 13 Aug 2020 02:22:58 +0000 (02:22 +0000)
Established tools like make(1), prove(1) and xargs(1) don't warn
when the desired parallelism level can't be met, either.

lib/PublicInbox/Admin.pm

index ce720beb6b2febd1439da2e40110fb06401db00b..d99a00b4b471d5983d38c7bd3150ebf0d03928b0 100644 (file)
@@ -219,9 +219,9 @@ sub index_inbox {
                                $v2w->{parallel} = 0;
                        } else {
                                my $n = $v2w->{shards};
-                               if ($jobs != ($n + 1) && !$opt->{reshard}) {
+                               if ($jobs < ($n + 1) && !$opt->{reshard}) {
                                        warn
-"Unable to respect --jobs=$jobs, inbox was created with $n shards\n";
+"Unable to respect --jobs=$jobs on index, inbox was created with $n shards\n";
                                }
                        }
                }