protected function addJobToQueue(string $jobName, string $payload = '') : string
    {
        if (!isset($this->jobQueues[$jobName])) {
            $this->jobQueues[$jobName] = [];
        }
        $jobId = $this->getJobId();
        array_push($this->jobQueues[$jobName], [
            'job_id' => $jobId,
            'payload' => $payload
        ]);
        $this->jobsInQueue++;
        return $jobId;
    }
protected function addJobToQueue(string $jobName, string $payload = '') : string
    {
        if (!isset($this->jobQueues[$jobName])) {
            $this->jobQueues[$jobName] = [];
        }
        $jobId = $this->getJobId();
        array_push($this->jobQueues[$jobName], [
            'job_id' => $jobId,
            'payload' => $payload
        ]);
        $this->jobsInQueue++;
        return $jobId;
    }
protected function addJobToQueue ( string $ jobName , string $ payload = '' ) : string { if ( ! isset ( $ this -> jobQueues [ $ jobName ] ) ) { $ this -> jobQueues [ $ jobName ] = [ ] ; } $ jobId = $ this -> getJobId ( ) ; array_push ( $ this -> jobQueues [ $ jobName ] , [ 'job_id' => $ jobId , 'payload' => $ payload ] ) ; $ this -> jobsInQueue ++ ; return $ jobId ; }
Adds a new job-requests to corresponding queue.

@param string $jobName
@param string $payload
@return string The id assigned to the job.
Adds a new job - requests to corresponding queue .