src/Queue/Worker/MongoWorker.php
public function processJob(JobInterface $job, QueueInterface $queue)
    {
        if (!$queue instanceof MongoQueue) {
            return;
        }

        if ($job instanceOf QueueAwareInterface) {
            $job->setQueue($queue);
        }

        try {
            return $job->execute();
        } catch (\Exception $exception) {
            $this->getLogger()->err('Job execution thrown exception: ' . get_class($exception));

            if ($job instanceOf ResultProviderInterface) {
                $job->setResult(JobResult::failure($exception->getMessage(), [$exception->getTraceAsString()]));
            } else {
                $this->getLogger()->err($exception->getMessage(), [$exception->getTraceAsString()]);
            }

            return ProcessJobEvent::JOB_STATUS_FAILURE;
        }
    }
public function processJob(JobInterface $job, QueueInterface $queue)
    {
        if (!$queue instanceof MongoQueue) {
            return;
        }

        if ($job instanceOf QueueAwareInterface) {
            $job->setQueue($queue);
        }

        try {
            return $job->execute();
        } catch (\Exception $exception) {
            $this->getLogger()->err('Job execution thrown exception: ' . get_class($exception));

            if ($job instanceOf ResultProviderInterface) {
                $job->setResult(JobResult::failure($exception->getMessage(), [$exception->getTraceAsString()]));
            } else {
                $this->getLogger()->err($exception->getMessage(), [$exception->getTraceAsString()]);
            }

            return ProcessJobEvent::JOB_STATUS_FAILURE;
        }
    }
Process job handler.

@param JobInterface   $job
@param QueueInterface $queue

@return int|void