protected function handleFailedJob(JobInterface $job, \Exception $exception)
    {
        if ($job instanceof TrackableJobInterface) {
            $job->setState(JobInterface::STATE_FAILED);
        }

        $this->getLogger()->error(
            'Perform failure on {job}, {message}',
            array(
                'job' => $job,
                'message' => $exception->getMessage(),
                'exception' => $exception
            )
        );

        $this->eventDispatcher->dispatch(
            ResqueJobEvents::FAILED,
            new JobFailedEvent($job, $exception, $this)
        );
    }
protected function handleFailedJob(JobInterface $job, \Exception $exception)
    {
        if ($job instanceof TrackableJobInterface) {
            $job->setState(JobInterface::STATE_FAILED);
        }

        $this->getLogger()->error(
            'Perform failure on {job}, {message}',
            array(
                'job' => $job,
                'message' => $exception->getMessage(),
                'exception' => $exception
            )
        );

        $this->eventDispatcher->dispatch(
            ResqueJobEvents::FAILED,
            new JobFailedEvent($job, $exception, $this)
        );
    }
protected function handleFailedJob ( JobInterface $ job , \ Exception $ exception ) { if ( $ job instanceof TrackableJobInterface ) { $ job -> setState ( JobInterface :: STATE_FAILED ) ; } $ this -> getLogger ( ) -> error ( 'Perform failure on {job}, {message}' , array ( 'job' => $ job , 'message' => $ exception -> getMessage ( ) , 'exception' => $ exception ) ) ; $ this -> eventDispatcher -> dispatch ( ResqueJobEvents :: FAILED , new JobFailedEvent ( $ job , $ exception , $ this ) ) ; }
Handle failed job

@param JobInterface $job The job that failed.
@param \Exception $exception The reason the job failed.
Handle failed job