Beispiel #1
0
 /**
  * @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));
 }
Beispiel #2
0
 public function pushJob(JobPayloadInterface $jobPayload)
 {
     // Adds a new job to the main queue
     $this->predis->lpush($this->queueKey, serialize($jobPayload));
 }
Beispiel #3
0
 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);
 }