/** * @group redis-lists */ public function testListLeftPushExists() { $this->assertEquals(0, $this->client->lpushx('foo', 'bar')); $this->assertFalse($this->client->exists('foo')); $this->client->lpush('foo', 'world'); $this->assertEquals(2, $this->client->lpushx('foo', 'hello')); $this->assertEquals(array('hello', 'world'), $this->client->lrange('foo', 0, -1)); }
public function pushJob(JobPayloadInterface $jobPayload) { // Adds a new job to the main queue $this->predis->lpush($this->queueKey, serialize($jobPayload)); }
public function save(StreamName $streamName, DomainMessage $event) { $data = $this->serializer->serialize($this->createEventData($event), 'json'); $this->redis->lpush($this->getNamespaceKey($streamName, $event->getId()), $data); $this->redis->rpush('published_events', $data); }