protected function createJob(Task $task, Lambda $operation, array $operationArgs)
    {
        $queue = $this->queue;

        if (isset($this->attributes['plannedStart']) && $this->attributes['plannedStart']) {
            $queue = $queue->at($this->attributes['plannedStart']);
        }

        if (isset($this->attributes['maxTries']) && $this->attributes['maxTries']) {
            $queue = $queue->tries($this->attributes['maxTries']);
        }

        if (isset($this->attributes['timeout']) && $this->attributes['timeout']) {
            $queue = $queue->timeout($this->attributes['timeout']);
        }

        if (isset($this->attributes['channelName']) && $this->attributes['channelName']) {
            $queue = $queue->onChannel($this->attributes['channelName']);
        }

        $jobArgs = [$task->getId(), $operation->toString(), $operationArgs];

        return $queue->run([TaskProxyJob::class, 'run'], $jobArgs);
    }
protected function createJob(Task $task, Lambda $operation, array $operationArgs)
    {
        $queue = $this->queue;

        if (isset($this->attributes['plannedStart']) && $this->attributes['plannedStart']) {
            $queue = $queue->at($this->attributes['plannedStart']);
        }

        if (isset($this->attributes['maxTries']) && $this->attributes['maxTries']) {
            $queue = $queue->tries($this->attributes['maxTries']);
        }

        if (isset($this->attributes['timeout']) && $this->attributes['timeout']) {
            $queue = $queue->timeout($this->attributes['timeout']);
        }

        if (isset($this->attributes['channelName']) && $this->attributes['channelName']) {
            $queue = $queue->onChannel($this->attributes['channelName']);
        }

        $jobArgs = [$task->getId(), $operation->toString(), $operationArgs];

        return $queue->run([TaskProxyJob::class, 'run'], $jobArgs);
    }
protected function createJob ( Task $ task , Lambda $ operation , array $ operationArgs ) { $ queue = $ this -> queue ; if ( isset ( $ this -> attributes [ 'plannedStart' ] ) && $ this -> attributes [ 'plannedStart' ] ) { $ queue = $ queue -> at ( $ this -> attributes [ 'plannedStart' ] ) ; } if ( isset ( $ this -> attributes [ 'maxTries' ] ) && $ this -> attributes [ 'maxTries' ] ) { $ queue = $ queue -> tries ( $ this -> attributes [ 'maxTries' ] ) ; } if ( isset ( $ this -> attributes [ 'timeout' ] ) && $ this -> attributes [ 'timeout' ] ) { $ queue = $ queue -> timeout ( $ this -> attributes [ 'timeout' ] ) ; } if ( isset ( $ this -> attributes [ 'channelName' ] ) && $ this -> attributes [ 'channelName' ] ) { $ queue = $ queue -> onChannel ( $ this -> attributes [ 'channelName' ] ) ; } $ jobArgs = [ $ task -> getId ( ) , $ operation -> toString ( ) , $ operationArgs ] ; return $ queue -> run ( [ TaskProxyJob :: class , 'run' ] , $ jobArgs ) ; }
Create a job in the queue to run the task.

@param Task   $task
@param Lambda $operation
@param array  $operationArgs

@return Job
Create a job in the queue to run the task .