]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/WWW.pm
www+httpd: lower priority of large mbox downloads
[public-inbox.git] / lib / PublicInbox / WWW.pm
index 570e690ec8136ca7cf6c98b4ea0138da42c57032..a7c961f4982a962c43071035660c90ed3a697d0a 100644 (file)
@@ -659,4 +659,13 @@ sub get_description {
        };
 }
 
+sub event_step { # called via requeue
+       my ($self) = @_;
+       # gzf = PublicInbox::GzipFilter == $ctx
+       my $gzf = shift(@{$self->{-low_prio_q}}) // return;
+       PublicInbox::DS::requeue($self) if scalar(@{$self->{-low_prio_q}});
+       my $http = $gzf->{env}->{'psgix.io'}; # PublicInbox::HTTP
+       $http->next_step($gzf->can('async_next'));
+}
+
 1;