Beispiel #1
0
 /**
  * @return Manager[]
  */
 public function managers()
 {
     return array_map(function (Server $server) {
         return $server->getManager();
     }, $this->pool->getServers());
 }
Beispiel #2
0
 /**
  * @param string $jobData
  * @param int $priority
  * @param int $delay
  * @param int $timeToRun
  * @return Job
  * @throws Exception\InvalidArgumentException
  */
 public function put($jobData, $priority = Beanie::DEFAULT_PRIORITY, $delay = Beanie::DEFAULT_DELAY, $timeToRun = Beanie::DEFAULT_TIME_TO_RUN)
 {
     return $this->createJob($jobData, $this->pool->transformTubeStatusTo($this->tubeStatus)->dispatchCommand($this->commandFactory->create(CommandInterface::COMMAND_PUT, [$jobData, $priority, $delay, $timeToRun]))->invoke());
 }