예제 #1
0
파일: PredisTest.php 프로젝트: gmo/cache
 /**
  * @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));
 }
예제 #2
0
파일: RedisQueue.php 프로젝트: yiqing95/bbq
 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);
 }
예제 #3
0
 /**
  * {@inheritDoc}
  */
 public function rpoplpush($source, $destination)
 {
     return $this->predis->rpoplpush($source, $destination);
 }