protected function onJobCompleted(string $workerId, string $jobId, string $result = '')
    {
        $jobType = $this->jobTypes[$jobId];
        $clientAddress = $this->jobAddresses[$jobId];
        if ($jobType === 'normal') {
            $this->respondToClient($clientAddress, $result);
        }
        unset(
            $this->jobTypes[$jobId],
            $this->jobAddresses[$jobId],
            $this->workerJobMap[$workerId]
        );
    }
protected function onJobCompleted(string $workerId, string $jobId, string $result = '')
    {
        $jobType = $this->jobTypes[$jobId];
        $clientAddress = $this->jobAddresses[$jobId];
        if ($jobType === 'normal') {
            $this->respondToClient($clientAddress, $result);
        }
        unset(
            $this->jobTypes[$jobId],
            $this->jobAddresses[$jobId],
            $this->workerJobMap[$workerId]
        );
    }
protected function onJobCompleted ( string $ workerId , string $ jobId , string $ result = '' ) { $ jobType = $ this -> jobTypes [ $ jobId ] ; $ clientAddress = $ this -> jobAddresses [ $ jobId ] ; if ( $ jobType === 'normal' ) { $ this -> respondToClient ( $ clientAddress , $ result ) ; } unset ( $ this -> jobTypes [ $ jobId ] , $ this -> jobAddresses [ $ jobId ] , $ this -> workerJobMap [ $ workerId ] ) ; }
Handles a completed job. Sends results back to client if it was not a background job.

@param string $workerId
@param string $jobId
@param string $result
Handles a completed job . Sends results back to client if it was not a background job .