X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FImport.pm;h=8406c9e268866fc23f9c4758f511994a964cfeea;hb=ad281240644ee370c75d95b35ad7833863257286;hp=664bec6910e5f4d70c6c10e21a1ff2de2da6bd09;hpb=dd83a896a7eb718dcd49560d0aab967f1f481883;p=public-inbox.git diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index 664bec69..8406c9e2 100644 --- a/lib/PublicInbox/Import.pm +++ b/lib/PublicInbox/Import.pm @@ -133,7 +133,6 @@ sub check_remove_v1 { (undef, $cur); } -# used for v2 (maybe) sub checkpoint { my ($self) = @_; return unless $self->{pid}; @@ -141,6 +140,15 @@ sub checkpoint { undef; } +sub progress { + my ($self, $msg) = @_; + return unless $self->{pid}; + print { $self->{out} } "progress $msg\n" or wfail; + $self->{in}->getline eq "progress $msg\n" or die + "progress $msg not received\n"; + undef; +} + # used for v2 sub get_mark { my ($self, $mark) = @_;