about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-04-03 02:24:24 +0000
committerEric Wong <e@80x24.org>2021-04-03 05:08:52 +0000
commitf7cf8f06088b417dc3fe5bdda228132a7ed2c4ff (patch)
tree9d263de2267022f1809c65c21812f30006646349 /lib
parent39b7af9565f85a720e7eeb7564cfa661000cb7e9 (diff)
downloadpublic-inbox-f7cf8f06088b417dc3fe5bdda228132a7ed2c4ff.tar.gz
We need net_merge_all and to lock the number of worker jobs.
Parallel inputs are not supported, yet (is it needed?, I don't
expect this to be used for multiple files very often...).
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/LeiTag.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/PublicInbox/LeiTag.pm b/lib/PublicInbox/LeiTag.pm
index d572a84a..06313139 100644
--- a/lib/PublicInbox/LeiTag.pm
+++ b/lib/PublicInbox/LeiTag.pm
@@ -112,7 +112,8 @@ sub lei_tag { # the "lei tag" method
         my $ops = { '' => [ \&tag_done, $lei ] };
         $lei->{auth}->op_merge($ops, $self) if $lei->{auth};
         $self->{vmd_mod} = $vmd_mod;
-        (my $op_c, $ops) = $lei->workers_start($self, 'lei_tag', 1, $ops);
+        my $j = $self->{-wq_nr_workers} = 1; # locked for now
+        (my $op_c, $ops) = $lei->workers_start($self, 'lei_tag', $j, $ops);
         $lei->{tag} = $self;
         net_merge_complete($self) unless $lei->{auth};
         $op_c->op_wait_event($ops);
@@ -175,4 +176,7 @@ sub _complete_tag {
         } grep(/$re\Q$cur/, @all);
 }
 
+no warnings 'once'; # the following works even when LeiAuth is lazy-loaded
+*net_merge_all = \&PublicInbox::LeiAuth::net_merge_all;
+
 1;