From 82abcce5e42991db9bf8afb559a88708ff667697 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 25 Oct 2023 00:29:30 +0000 Subject: httpd/async: require IO arg Callers that want to requeue can call PublicInbox::DS::requeue directly and not go through the convoluted argument handling via PublicInbox::HTTPD::Async->new. --- lib/PublicInbox/SolverGit.pm | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'lib/PublicInbox/SolverGit.pm') diff --git a/lib/PublicInbox/SolverGit.pm b/lib/PublicInbox/SolverGit.pm index 5f317f51..23d4d3d1 100644 --- a/lib/PublicInbox/SolverGit.pm +++ b/lib/PublicInbox/SolverGit.pm @@ -386,12 +386,9 @@ sub event_step ($) { } sub next_step ($) { - my ($self) = @_; # if outside of public-inbox-httpd, caller is expected to be # looping event_step, anyways - my $async = $self->{psgi_env}->{'pi-httpd.async'} or return; - # PublicInbox::HTTPD::Async->new - $async->(undef, undef, $self); + PublicInbox::DS::requeue($_[0]) if $_[0]->{psgi_env}->{'pi-httpd.async'} } sub mark_found ($$$) { @@ -690,9 +687,8 @@ sub solve ($$$$$) { $self->{found} = {}; # { abbr => [ ::Git, oid, type, size, $di ] } dbg($self, "solving $oid_want ..."); - if (my $async = $env->{'pi-httpd.async'}) { - # PublicInbox::HTTPD::Async->new - $async->(undef, undef, $self); + if ($env->{'pi-httpd.async'}) { + PublicInbox::DS::requeue($self); } else { event_step($self) while $self->{user_cb}; } -- cgit v1.2.3-24-ge0c7