public function execute(QueueInterface $queue, Message $message): bool
    {
        $service = $this->objectManager->get($this->className);
        $this->deferMethodCallAspect->setProcessingJob(true);
        try {
            $methodName = $this->methodName;
            call_user_func_array([$service, $methodName], $this->arguments);
            return true;
        } catch (\Exception $exception) {
            throw $exception;
        } finally {
            $this->deferMethodCallAspect->setProcessingJob(false);
        }
    }
public function execute(QueueInterface $queue, Message $message): bool
    {
        $service = $this->objectManager->get($this->className);
        $this->deferMethodCallAspect->setProcessingJob(true);
        try {
            $methodName = $this->methodName;
            call_user_func_array([$service, $methodName], $this->arguments);
            return true;
        } catch (\Exception $exception) {
            throw $exception;
        } finally {
            $this->deferMethodCallAspect->setProcessingJob(false);
        }
    }
public function execute ( QueueInterface $ queue , Message $ message ) : bool { $ service = $ this -> objectManager -> get ( $ this -> className ) ; $ this -> deferMethodCallAspect -> setProcessingJob ( true ) ; try { $ methodName = $ this -> methodName ; call_user_func_array ( [ $ service , $ methodName ] , $ this -> arguments ) ; return true ; } catch ( \ Exception $ exception ) { throw $ exception ; } finally { $ this -> deferMethodCallAspect -> setProcessingJob ( false ) ; } }
Execute the job

A job should finish itself after successful execution using the queue methods.

@param QueueInterface $queue
@param Message $message
@return boolean TRUE If the execution was successful
@throws \Exception
Execute the job