From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id B91691FA11 for ; Wed, 12 Aug 2020 09:17:19 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 4/6] admin: don't warn when --jobs exceeds shards Date: Wed, 12 Aug 2020 09:17:17 +0000 Message-Id: <20200812091719.13739-5-e@yhbt.net> In-Reply-To: <20200812091719.13739-1-e@yhbt.net> References: <20200812091719.13739-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/Admin.pm b/lib/PublicInbox/Admin.pm index ce720beb6..d99a00b4b 100644 --- a/lib/PublicInbox/Admin.pm +++ b/lib/PublicInbox/Admin.pm @@ -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"; } } }