/**
  * {@inheritdoc}
  */
 public function push($item, $eta = null)
 {
     $this->pheanstalk->putInTube($this->tubeName, $item, PheanstalkInterface::DEFAULT_PRIORITY, QueueUtils::calculateDelay($eta));
 }
Beispiel #2
0
 /**
  * @dataProvider provideValidEtas
  */
 public function testCalcDelay($eta, $_, $delay)
 {
     $this->assertEquals($delay, QueueUtils::calculateDelay($eta));
 }
Beispiel #3
0
 /**
  * {@inheritdoc}
  */
 public function push($item, $eta = null)
 {
     $sql = sprintf('INSERT INTO %s (eta, item) VALUES (%d, %s)', $this->tableName, QueueUtils::normalizeEta($eta), $this->pdo->quote($item));
     $this->pdo->exec($sql);
 }