Exemple #1
0
 /**
  * Get the hostname/ip of the server that will run this job.
  *
  * If a server hasn't been picked yet we'll go ahead and pick one
  *
  * @return array An array with an available server's hostname and post
  *  array('host' => example.com, 'port' => 80)
  */
 private function getJobServer($force = false)
 {
     if (!$force && $this->jobServer) {
         return $this->jobServer;
     }
     $this->jobServer = Resqee_Config_Jobs::getServer($this);
     if (!$this->jobServer) {
         throw new Resqee_Exception('There are no servers available to run this job. ' . ' Add an entry for this job in <include_path>');
     } else {
         return $this->jobServer;
     }
 }