} else {
return "E: $ekey unsupported inbox version (v$v)";
}
- for my $unit (@{delete($self->{todo}) // []}) {
- last if $self->{quit};
- index_todo($self, $sync, $unit);
- }
+ PublicInbox::V2Writable::process_todo $self, $sync;
$self->{midx}->index_ibx($ibx) unless $self->{quit};
$ibx->git->cleanup; # done with this inbox, now
undef;
sub index_todo ($$$) {
my ($self, $sync, $unit) = @_;
- return if $self->{quit};
unindex_todo($self, $sync, $unit);
my $stk = delete($unit->{stack}) or return;
my $all = $self->git; # initialize self->{ibx}->{git}
$self->done;
}
+sub process_todo ($$) {
+ my ($self, $sync) = @_;
+ for my $unit (@{delete($self->{todo}) // []}) {
+ last if $self->{quit};
+ $self->index_todo($sync, $unit); # may be ExtSearchIdx
+ }
+}
+
# public, called by public-inbox-index
sub index_sync {
my ($self, $opt) = @_;
}
}
# work forwards through history
- index_todo($self, $sync, $_) for @{delete($self->{todo}) // []};
+ process_todo $self, $sync;
$self->{oidx}->rethread_done($opt) unless $self->{quit};
$self->done;