user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: "Eric Wong (Contractor, The Linux Foundation)" <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 5/8] index: allow specifying --jobs=0 to disable multiprocess
Date: Sat,  7 Apr 2018 03:41:51 +0000	[thread overview]
Message-ID: <20180407034154.2309-6-e@80x24.org> (raw)
In-Reply-To: <20180407034154.2309-1-e@80x24.org>

Not everybody needs multiprocess support.
---
 script/public-inbox-index | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/script/public-inbox-index b/script/public-inbox-index
index 73f88ac..db7ebba 100755
--- a/script/public-inbox-index
+++ b/script/public-inbox-index
@@ -31,7 +31,7 @@ my %opts = (
 	'--prune' => \$prune,
 );
 GetOptions(%opts) or die "bad command-line args\n$usage";
-die "--jobs must be positive\n" if defined $jobs && $jobs <= 0;
+die "--jobs must be positive\n" if defined $jobs && $jobs < 0;
 
 my @dirs;
 
@@ -101,11 +101,11 @@ sub index_dir {
 		eval { require PublicInbox::V2Writable };
 		die "v2 requirements not met: $@\n" if $@;
 		my $v2w = eval {
-			local $ENV{NPROC} = $jobs;
+			local $ENV{NPROC} = $jobs if $jobs;
 			PublicInbox::V2Writable->new($repo);
 		};
 		if (defined $jobs) {
-			if ($jobs == 1) {
+			if ($jobs == 0) {
 				$v2w->{parallel} = 0;
 			} else {
 				my $n = $v2w->{partitions};
-- 
EW


  parent reply	other threads:[~2018-04-07  3:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-07  3:41 [PATCH 0/8] less code, less memory, more speed Eric Wong (Contractor, The Linux Foundation)
2018-04-07  3:41 ` [PATCH 1/8] psgi: ensure /$INBOX/$MESSAGE_ID/T/ endpoint is chronological Eric Wong (Contractor, The Linux Foundation)
2018-04-07  3:41 ` [PATCH 2/8] over: avoid excessive SELECT Eric Wong (Contractor, The Linux Foundation)
2018-04-07  3:41 ` [PATCH 3/8] over: remove forked subprocess Eric Wong (Contractor, The Linux Foundation)
2018-04-07  3:41 ` [PATCH 4/8] v2writable: reduce barriers Eric Wong (Contractor, The Linux Foundation)
2018-04-07  3:41 ` Eric Wong (Contractor, The Linux Foundation) [this message]
2018-04-07  3:41 ` [PATCH 6/8] convert: support converting with altid defined Eric Wong (Contractor, The Linux Foundation)
2018-04-07  3:41 ` [PATCH 7/8] store less data in the Xapian document Eric Wong (Contractor, The Linux Foundation)
2018-04-07  3:41 ` [PATCH 8/8] msgmap: speed up minmax with separate queries Eric Wong (Contractor, The Linux Foundation)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180407034154.2309-6-e@80x24.org \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).