示例#1
0
文件: QMan.php 项目: zwilias/qman
 /**
  * @param CommandInterface $command
  * @param string $tube
  * @param int $priority
  * @param int $delay
  * @param int $timeToRun
  * @throws Exception
  */
 public function queue(CommandInterface $command, $tube = Beanie::DEFAULT_TUBE, $priority = Beanie::DEFAULT_PRIORITY, $delay = Beanie::DEFAULT_DELAY, $timeToRun = Beanie::DEFAULT_TIME_TO_RUN)
 {
     try {
         $this->producer->useTube($tube)->put($this->serializer->serialize($command), $priority, $delay, $timeToRun);
     } catch (Exception $exception) {
         $this->handlePutFailure($exception, $command);
     }
 }