]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiBlob.pm
lei: simplify workers_start API
[public-inbox.git] / lib / PublicInbox / LeiBlob.pm
index 0b96bd04cef553196d9f6e2b2227349c6c934907..710430a2c1981e2170c607d83a4cb0c782c54996 100644 (file)
@@ -10,12 +10,6 @@ use parent qw(PublicInbox::IPC);
 use PublicInbox::Spawn qw(spawn popen_rd which);
 use PublicInbox::DS;
 
-sub _lei_wq_eof { # EOF callback for main daemon
-       my ($lei) = @_;
-       my $sol = delete $lei->{sol} // return $lei->dclose; # already failed
-       $sol->wq_wait_old($lei->can('wq_done_wait'), $lei);
-}
-
 sub get_git_dir ($$) {
        my ($lei, $d) = @_;
        return $d if -d "$d/objects" && -d "$d/refs" && -e "$d/HEAD";
@@ -157,8 +151,8 @@ EOM
        }
        require PublicInbox::SolverGit;
        my $self = bless { lxs => $lxs, oid_b => $blob }, __PACKAGE__;
-       my ($op_c, $ops) = $lei->workers_start($self, 'lei-blob', 1);
-       $lei->{sol} = $self;
+       my ($op_c, $ops) = $lei->workers_start($self, 1);
+       $lei->{wq1} = $self;
        $self->wq_io_do('do_solve_blob', []);
        $self->wq_close(1);
        $op_c->op_wait_event($ops);
@@ -167,7 +161,6 @@ EOM
 sub ipc_atfork_child {
        my ($self) = @_;
        $self->{lei}->_lei_atfork_child;
-       $SIG{__WARN__} = PublicInbox::Eml::warn_ignore_cb();
        $self->SUPER::ipc_atfork_child;
 }