$gz;
}
+sub gone { # what: search/over/mm
+ my ($ctx, $what) = @_;
+ warn "W: `$ctx->{ibx}->{name}' $what went away unexpectedly\n";
+ undef;
+}
+
# for GetlineBody (via Qspawn) when NOT using $env->{'pi-httpd.async'}
# Also used for ->getline callbacks
sub translate ($$) {
sub bail {
my $self = shift;
if (my $env = $self->{env}) {
- eval { $env->{'psgi.errors'}->print(@_, "\n") };
- warn("E: error printing to psgi.errors: $@", @_) if $@;
+ warn @_, "\n";
my $http = $env->{'psgix.io'} or return; # client abort
eval { $http->close }; # should hit our close
warn "E: error in http->close: $@" if $@;
$smsg->{blob} eq $oid or bail($self, "BUG: $smsg->{blob} != $oid");
eval { $self->async_eml(PublicInbox::Eml->new($bref)) };
bail($self, "E: async_eml: $@") if $@;
- $http->next_step($self->can('async_next'));
+ if ($self->{-low_prio}) {
+ push(@{$self->{www}->{-low_prio_q}}, $self) == 1 and
+ PublicInbox::DS::requeue($self->{www});
+ } else {
+ $http->next_step($self->can('async_next'));
+ }
}
sub smsg_blob {
my ($self, $smsg) = @_;
- git_async_cat($self->{ibx}->git, $smsg->{blob},
- \&async_blob_cb, $self);
+ ibx_async_cat($self->{ibx}, $smsg->{blob}, \&async_blob_cb, $self);
}
1;