Phalcon\Queue\Beanstalk\Extended::reserveFromTube PHP Method

reserveFromTube() public method

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
return boolean | Phalcon\Queue\Beanstalk\Job
    public function reserveFromTube($tube, $timeout = null)
    {
        $this->watch($this->getTubeName($tube));
        return parent::reserve($timeout);
    }

Usage Example

Exemplo n.º 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());
 }
All Usage Examples Of Phalcon\Queue\Beanstalk\Extended::reserveFromTube