X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FLeiRefreshMailSync.pm;h=a60a9a5e9761ca2ca89320adfd121d291b070e8b;hb=778fa5917ec3b46daa09819296d91cdbe855352d;hp=0cb9f3dccd48ae934937541453692fd492c91e4a;hpb=010159a7b789a3a27c917a5378db92c8adf78a9e;p=public-inbox.git diff --git a/lib/PublicInbox/LeiRefreshMailSync.pm b/lib/PublicInbox/LeiRefreshMailSync.pm index 0cb9f3dc..a60a9a5e 100644 --- a/lib/PublicInbox/LeiRefreshMailSync.pm +++ b/lib/PublicInbox/LeiRefreshMailSync.pm @@ -73,6 +73,8 @@ lei mail_sync.sqlite3 uninitialized, see lei-import(1) EOM if (defined(my $all = $lei->{opt}->{all})) { $lms->group2folders($lei, $all, \@folders) or return; + # TODO: handle NNTP servers which delete messages + @folders = grep(!m!\Anntps?://!, @folders); } else { $lms->arg2folder($lei, \@folders); # may die } @@ -81,13 +83,8 @@ EOM my $self = bless { missing_ok => 1, lms => $lms }, __PACKAGE__; $lei->{opt}->{'mail-sync'} = 1; # for prepare_inputs $self->prepare_inputs($lei, \@folders) or return; - my $ops = {}; - $lei->{auth}->op_merge($ops, $self) if $lei->{auth}; - (my $op_c, $ops) = $lei->workers_start($self, 1, $ops); - $lei->{wq1} = $self; $lei->{-err_type} = 'non-fatal'; - net_merge_all_done($self) unless $lei->{auth}; - $lei->wait_wq_events($op_c, $ops); # net_merge_all_done if !{auth} + $lei->wq1_start($self); } sub ipc_atfork_child { # needed for PublicInbox::LeiPmdir