public function deregisterOnWorkerExit(WorkerInterface $worker)
    {
        $process = $worker->getProcess();
        $process->wait();
        if ($process->isCleanExit()) {
            $this->registry->deregister($worker);
        } else {
            throw new ResqueRuntimeException(
                sprintf(
                    'Foreman error with worker %s wait on pid %d',
                    $worker->getId(),
                    $process->getPid()
                )
            );
        }
    }
public function deregisterOnWorkerExit(WorkerInterface $worker)
    {
        $process = $worker->getProcess();
        $process->wait();
        if ($process->isCleanExit()) {
            $this->registry->deregister($worker);
        } else {
            throw new ResqueRuntimeException(
                sprintf(
                    'Foreman error with worker %s wait on pid %d',
                    $worker->getId(),
                    $process->getPid()
                )
            );
        }
    }
public function deregisterOnWorkerExit ( WorkerInterface $ worker ) { $ process = $ worker -> getProcess ( ) ; $ process -> wait ( ) ; if ( $ process -> isCleanExit ( ) ) { $ this -> registry -> deregister ( $ worker ) ; } else { throw new ResqueRuntimeException ( sprintf ( 'Foreman error with worker %s wait on pid %d' , $ worker -> getId ( ) , $ process -> getPid ( ) ) ) ; } }
Deregister on worker exit.

@param WorkerInterface $worker The worker to wait for exit and then deregister.
@throws ResqueRuntimeException when $worker fails to exit cleanly.
@return void
Deregister on worker exit .