コード例 #1
0
 /**
  * {@inheritDoc}
  */
 public function listTubes()
 {
     if ($this->dispatcher) {
         $this->dispatcher->dispatch(CommandEvent::LIST_TUBES, new CommandEvent($this));
     }
     return $this->pheanstalk->listTubes();
 }
コード例 #2
0
ファイル: Daemon.php プロジェクト: zource/zource
 public function getTubeStats()
 {
     $result = [];
     $tubes = $this->pheanstalk->listTubes();
     foreach ($tubes as $tubeName) {
         $stats = $this->pheanstalk->statsTube($tubeName);
         $result[] = ['name' => $tubeName, 'buried' => $stats['current-jobs-buried'], 'delayed' => $stats['current-jobs-delayed'], 'ready' => $stats['current-jobs-ready'], 'reserved' => $stats['current-jobs-reserved'], 'urgent' => $stats['current-jobs-urgent'], 'waiting' => $stats['current-waiting'], 'total' => $stats['total-jobs']];
     }
     return $result;
 }