From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 5F0181F4B4; Sun, 24 Jan 2021 12:37:53 +0000 (UTC) Date: Sun, 24 Jan 2021 09:37:53 -0300 From: Eric Wong To: meta@public-inbox.org Subject: Re: [PATCH 7/9] lei q: fix JSON overview with remote externals Message-ID: <20210124123753.GA30484@dcvr> References: <20210124114655.12815-1-e@80x24.org> <20210124114655.12815-8-e@80x24.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210124114655.12815-8-e@80x24.org> List-Id: Eric Wong wrote: > --- a/lib/PublicInbox/LeiOverview.pm > +++ b/lib/PublicInbox/LeiOverview.pm > @@ -209,7 +209,7 @@ sub ovv_each_smsg_cb { # runs in wq worker usually > $json->ascii(1) if $lei->{opt}->{ascii}; > } > my $l2m = $lei->{l2m}; > - if ($l2m && $ibxish->can('scheme')) { # remote https?:// mboxrd > + if ($l2m && !$ibxish) { # remote https?:// mboxrd I made this change last, thus necessitating changes to callers: > --- a/lib/PublicInbox/LeiXSearch.pm > +++ b/lib/PublicInbox/LeiXSearch.pm > @@ -208,9 +201,9 @@ sub query_remote_mboxrd { > } > $opt->{torsocks} = 'false' if $opt->{'no-torsocks'}; > my $tor = $opt->{torsocks} //= 'auto'; > + my $each_smsg = $lei->{ovv}->ovv_each_smsg_cb($lei, $uris->[0]); Will squash this in, otherwise --remote --no-local won't work: diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm index 841257c1..fb608d00 100644 --- a/lib/PublicInbox/LeiXSearch.pm +++ b/lib/PublicInbox/LeiXSearch.pm @@ -201,7 +201,7 @@ sub query_remote_mboxrd { } $opt->{torsocks} = 'false' if $opt->{'no-torsocks'}; my $tor = $opt->{torsocks} //= 'auto'; - my $each_smsg = $lei->{ovv}->ovv_each_smsg_cb($lei, $uris->[0]); + my $each_smsg = $lei->{ovv}->ovv_each_smsg_cb($lei); for my $uri (@$uris) { $uri->query_form(@qform); my $cmd = [ @cmd, $uri->as_string ];