/** * @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); } }