about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/PublicInbox/V2Writable.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm
index 37d27302..72d8d5af 100644
--- a/lib/PublicInbox/V2Writable.pm
+++ b/lib/PublicInbox/V2Writable.pm
@@ -107,8 +107,11 @@ sub new {
 
 # public (for now?)
 sub init_inbox {
-        my ($self, $parallel, $skip_epoch) = @_;
-        $self->{parallel} = $parallel;
+        my ($self, $shards, $skip_epoch) = @_;
+        if (defined $shards) {
+                $self->{parallel} = 0 if $shards == 0;
+                $self->{shards} = $shards if $shards > 0;
+        }
         $self->idx_init;
         my $epoch_max = -1;
         git_dir_latest($self, \$epoch_max);