public function process() {
		$job = $this->connection->pop();

		if ( ! $job ) {
			return false;
		}

		$exception = null;

		try {
			$job->handle();
		} catch ( Exception $exception ) {
			$job->release();
		}

		if ( $job->attempts() >= $this->attempts ) {
			if ( empty( $exception ) ) {
				$exception = new WorkerAttemptsExceededException();
			}
			
			$job->fail();
		}

		if ( $job->failed() ) {
			$this->connection->failure( $job, $exception );
		} else if ( $job->released() ) {
			$this->connection->release( $job );
		} else {
			$this->connection->delete( $job );
		}

		return true;
	}
public function process() {
		$job = $this->connection->pop();

		if ( ! $job ) {
			return false;
		}

		$exception = null;

		try {
			$job->handle();
		} catch ( Exception $exception ) {
			$job->release();
		}

		if ( $job->attempts() >= $this->attempts ) {
			if ( empty( $exception ) ) {
				$exception = new WorkerAttemptsExceededException();
			}
			
			$job->fail();
		}

		if ( $job->failed() ) {
			$this->connection->failure( $job, $exception );
		} else if ( $job->released() ) {
			$this->connection->release( $job );
		} else {
			$this->connection->delete( $job );
		}

		return true;
	}
public function process ( ) { $ job = $ this -> connection -> pop ( ) ; if ( ! $ job ) { return false ; } $ exception = null ; try { $ job -> handle ( ) ; } catch ( Exception $ exception ) { $ job -> release ( ) ; } if ( $ job -> attempts ( ) >= $ this -> attempts ) { if ( empty ( $ exception ) ) { $ exception = new WorkerAttemptsExceededException ( ) ; } $ job -> fail ( ) ; } if ( $ job -> failed ( ) ) { $ this -> connection -> failure ( $ job , $ exception ) ; } else if ( $ job -> released ( ) ) { $ this -> connection -> release ( $ job ) ; } else { $ this -> connection -> delete ( $ job ) ; } return true ; }
Process a job on the queue.

@return bool
Process a job on the queue .