From e85ea061aa504e490bccbaad8d249ce039c0ab53 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 7 Jul 2022 09:40:29 +0000 Subject: [PATCH] lei_xsearch: simplify lei/store import check There's no need to check for two fields when one will suffice. --- lib/PublicInbox/LeiXSearch.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm index 2958d3f9..41e79856 100644 --- a/lib/PublicInbox/LeiXSearch.pm +++ b/lib/PublicInbox/LeiXSearch.pm @@ -285,7 +285,7 @@ sub each_remote_eml { # callback for MboxReader->mboxrd my ($res, $kw) = $self->{import_sto}->wq_do('add_eml', $eml); if (ref($res) eq ref($smsg)) { # totally new message $smsg = $res; - $self->{-imported} = 1; + $self->{-sto_imported} = 1; } $smsg->{kw} = $kw; # short-circuit xsmsg_vmd } @@ -376,7 +376,7 @@ sub query_remote_mboxrd { $fh = IO::Uncompress::Gunzip->new($fh, MultiStream => 1); PublicInbox::MboxReader->mboxrd($fh, \&each_remote_eml, $self, $lei, $each_smsg); - if ($self->{import_sto} && delete($self->{-imported})) { + if (delete($self->{-sto_imported})) { my $wait = $self->{import_sto}->wq_do('done'); } $reap_curl->join; -- 2.44.0