Esempio n. 1
0
 /**
  * @group redis-lists
  */
 public function testListRightPopLeftPush()
 {
     $this->assertNull($this->client->rpoplpush('foo', 'bar'));
     $this->assertEquals(array(), $this->client->lrange('bar', 0, -1));
     $this->client->rpush('foo', 'A', 'B');
     $this->client->rpush('bar', 'C', 'D');
     $this->assertEquals('B', $this->client->rpoplpush('foo', 'bar'));
     $this->assertEquals(array('A'), $this->client->lrange('foo', 0, -1));
     $this->assertEquals(array('B', 'C', 'D'), $this->client->lrange('bar', 0, -1));
 }
Esempio n. 2
0
 public function releaseJob(JobInterface $job)
 {
     // Returning the job back to the main queue from the processing queue
     $this->predis->rpoplpush($job->getProcessingKey(), $this->queueKey);
     $this->deleteLockedJob($job);
 }
Esempio n. 3
0
 /**
  * {@inheritDoc}
  */
 public function rpoplpush($source, $destination)
 {
     return $this->predis->rpoplpush($source, $destination);
 }