Ejemplo n.º 1
0
 /**
  * @group redis-lists
  */
 public function testListRemove()
 {
     $this->assertSame(0, $this->client->lrem('foo', 0, 'A'));
     $this->client->rpush('foo', 'A', 'B', 'C', 'A', 'A');
     $this->assertSame(3, $this->client->lrem('foo', 0, 'A'));
     $this->assertEquals(array('B', 'C'), $this->client->lrange('foo', 0, -1));
     $this->client->rpush('foo', 'B');
     $this->assertSame(1, $this->client->lrem('foo', -1, 'B'));
     $this->assertEquals(array('B', 'C'), $this->client->lrange('foo', 0, -1));
     $this->client->rpush('foo', 'B');
     $this->assertSame(1, $this->client->lrem('foo', 1, 'B'));
     $this->assertEquals(array('C', 'B'), $this->client->lrange('foo', 0, -1));
 }
Ejemplo n.º 2
0
 public function finalizeJob(JobInterface $job)
 {
     //
     $this->predis->lrem($job->getProcessingKey(), 0, $job->getRawData());
     $this->deleteLockedJob($job);
 }