about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiQuery.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-02-22 08:22:56 -0300
committerEric Wong <e@80x24.org>2021-02-22 18:14:21 -0400
commitfa5650d399f51a596e5c126b3ce65347409d4fe9 (patch)
treeb96b5ccaaf4a41135948f753572b2fa408908278 /lib/PublicInbox/LeiQuery.pm
parenteda916393e1d7c203225279df84ccf692953ab57 (diff)
downloadpublic-inbox-fa5650d399f51a596e5c126b3ce65347409d4fe9.tar.gz
We can rework the first lei2mail worker to authenticate, and
then share auth info with the rest of the lei2mail workers.  As
with "lei import", this uses PktOp and lei-daemon to share
updated credentials between the first an subsequent l2m workers.
Diffstat (limited to 'lib/PublicInbox/LeiQuery.pm')
-rw-r--r--lib/PublicInbox/LeiQuery.pm9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/PublicInbox/LeiQuery.pm b/lib/PublicInbox/LeiQuery.pm
index 398f834f..64c9394c 100644
--- a/lib/PublicInbox/LeiQuery.pm
+++ b/lib/PublicInbox/LeiQuery.pm
@@ -13,14 +13,11 @@ sub prep_ext { # externals_each callback
 
 sub _start_query {
         my ($self) = @_;
-        if (my $nwr = $self->{nwr}) {
+        if (my $net = $self->{net}) {
                 require PublicInbox::LeiAuth;
-                my $auth = $self->{auth} = PublicInbox::LeiAuth->new($nwr);
-                my $lxs = $self->{lxs};
-                $auth->auth_start($self, $lxs->can('do_query'), $lxs, $self);
-        } else {
-                $self->{lxs}->do_query($self);
+                $self->{auth} = PublicInbox::LeiAuth->new($net);
         }
+        $self->{lxs}->do_query($self);
 }
 
 sub qstr_add { # PublicInbox::InputPipe::consume callback for --stdin