Ejemplo n.º 1
0
 /**
  * Terminates servers used this farm role
  */
 public function terminateServers()
 {
     /* @var $server Server */
     foreach (Server::findByFarmRoleId($this->id) as $server) {
         $DBServer = \DBServer::LoadByID($server->serverId);
         $DBServer->terminate(DBServer::TERMINATE_REASON_ROLE_REMOVED);
         $event = new HostDownEvent($DBServer);
         Scalr::FireEvent($DBServer->farmId, $event);
     }
 }