reserveFromTube() публичный метод

Reserves/locks a ready job from the specified tube.
public reserveFromTube ( string $tube, integer $timeout = null ) : boolean | Phalcon\Queue\Beanstalk\Job
$tube string
$timeout integer
Результат boolean | Phalcon\Queue\Beanstalk\Job
Пример #1
0
 public function testShouldPutAndReserve()
 {
     $this->client->putInTube(self::TUBE_NAME, 'testPutInTube');
     $job = $this->client->reserveFromTube(self::TUBE_NAME);
     $this->assertNotEmpty($job);
     $this->assertInstanceOf(self::JOB_CLASS, $job);
     $this->assertTrue($job->delete());
 }
Пример #2
0
 public function testPutAndReserve()
 {
     $this->client->putInTube($this->tubeName, 'testPutInTube');
     $job = $this->client->reserveFromTube($this->tubeName);
     $this->assertNotEmpty($job);
     $this->assertInstanceOf('Phalcon\\Queue\\Beanstalk\\Job', $job);
     $this->assertTrue($job->delete());
 }