public function doBackground(string $jobName, string $workload) : string
    {
        try {
            $this->socket->send(json_encode([
                'action' => 'background_job',
                'job' => [
                    'name' => $jobName,
                    'workload' => $workload
                ]
            ]));
            $result = $this->socket->recv();
            return $result;
        } catch (\ZMQException $e) {
            throw new ClientException($e->getMessage());
        }
    }
public function doBackground(string $jobName, string $workload) : string
    {
        try {
            $this->socket->send(json_encode([
                'action' => 'background_job',
                'job' => [
                    'name' => $jobName,
                    'workload' => $workload
                ]
            ]));
            $result = $this->socket->recv();
            return $result;
        } catch (\ZMQException $e) {
            throw new ClientException($e->getMessage());
        }
    }
public function doBackground ( string $ jobName , string $ workload ) : string { try { $ this -> socket -> send ( json_encode ( [ 'action' => 'background_job' , 'job' => [ 'name' => $ jobName , 'workload' => $ workload ] ] ) ) ; $ result = $ this -> socket -> recv ( ) ; return $ result ; } catch ( \ ZMQException $ e ) { throw new ClientException ( $ e -> getMessage ( ) ) ; } }
Executes a job in background or non-blocking mode. Returns the job handle received from server but not a
job result.

@param string $jobName
@param string $workload
@return string Job handle
@throws ClientException
Executes a job in background or non - blocking mode . Returns the job handle received from server but not a job result .