]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiInput.pm
lei: use standard warn() in more places
[public-inbox.git] / lib / PublicInbox / LeiInput.pm
index fe736981ba6565d111871f6778b11838d1ecf83d..6a90e7e1e756fa02bfe68c0496edcfe336f3257d 100644 (file)
@@ -57,6 +57,12 @@ sub check_input_format ($;$) {
        1;
 }
 
+sub input_mbox_cb { # base MboxReader callback
+       my ($eml, $self) = @_;
+       $eml->header_set($_) for (qw(Status X-Status));
+       $self->input_eml_cb($eml);
+}
+
 # import a single file handle of $name
 # Subclass must define ->input_eml_cb and ->input_mbox_cb
 sub input_fh {
@@ -337,8 +343,8 @@ $input is `eml', not --in-format=$in_fmt
 --mail-sync specified but no inputs support it
 
                # non-fatal if some inputs support support sync
-               $lei->err("# --mail-sync will only be used for @{$sync->{ok}}");
-               $lei->err("# --mail-sync is not supported for: @{$sync->{no}}");
+               warn("# --mail-sync will only be used for @{$sync->{ok}}\n");
+               warn("# --mail-sync is not supported for: @{$sync->{no}}\n");
        }
        if ($net) {
                $net->{-can_die} = 1;
@@ -378,7 +384,7 @@ sub process_inputs {
        }
        # always commit first, even on error partial work is acceptable for
        # lei <import|tag|convert>
-       my $wait = $self->{lei}->{sto}->ipc_do('done') if $self->{lei}->{sto};
+       my $wait = $self->{lei}->{sto}->wq_do('done') if $self->{lei}->{sto};
        $self->{lei}->fail($err) if $err;
 }