src/Command/Queue/Pull/PredisUniquePullCommandQueue.php
public function pull()
    {
        $value = $this->client->lpop($this->queue_name);

        if (!$value) {
            return null;
        }

        try {
            return $this->serializer->deserialize($value);
        } catch (\Exception $e) {
            // it's a critical error
            // it is necessary to react quickly to it
            $this->logger->critical('Failed denormalize a command in the Redis queue', [$value, $e->getMessage()]);

            // try denormalize in later
            $this->client->rpush($this->queue_name, [$value]);

            return null;
        }
    }
public function pull()
    {
        $value = $this->client->lpop($this->queue_name);

        if (!$value) {
            return null;
        }

        try {
            return $this->serializer->deserialize($value);
        } catch (\Exception $e) {
            // it's a critical error
            // it is necessary to react quickly to it
            $this->logger->critical('Failed denormalize a command in the Redis queue', [$value, $e->getMessage()]);

            // try denormalize in later
            $this->client->rpush($this->queue_name, [$value]);

            return null;
        }
    }
public function pull ( ) { $ value = $ this -> client -> lpop ( $ this -> queue_name ) ; if ( ! $ value ) { return null ; } try { return $ this -> serializer -> deserialize ( $ value ) ; } catch ( \ Exception $ e ) { // it's a critical error // it is necessary to react quickly to it $ this -> logger -> critical ( 'Failed denormalize a command in the Redis queue' , [ $ value , $ e -> getMessage ( ) ] ) ; // try denormalize in later $ this -> client -> rpush ( $ this -> queue_name , [ $ value ] ) ; return null ; } }
Pop command from queue. Return NULL if queue is empty.

@return Command|null
Pop command from queue . Return NULL if queue is empty .