-handle case gracefully when pypo hasn't registered with Airtime server yet.
This commit is contained in:
parent
ccd843a35a
commit
5059d13156
|
@ -120,23 +120,31 @@ class Application_Model_Systemstatus
|
||||||
public static function GetPypoStatus(){
|
public static function GetPypoStatus(){
|
||||||
|
|
||||||
$component = CcServiceRegisterQuery::create()->findOneByDbName("pypo");
|
$component = CcServiceRegisterQuery::create()->findOneByDbName("pypo");
|
||||||
$ip = $component->getDbIp();
|
if (is_null($component)){
|
||||||
|
return null;
|
||||||
$docRoot = self::GetMonitStatus($ip);
|
} else {
|
||||||
$data = self::ExtractServiceInformation($docRoot, "airtime-playout");
|
$ip = $component->getDbIp();
|
||||||
|
|
||||||
|
$docRoot = self::GetMonitStatus($ip);
|
||||||
|
$data = self::ExtractServiceInformation($docRoot, "airtime-playout");
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function GetLiquidsoapStatus(){
|
public static function GetLiquidsoapStatus(){
|
||||||
|
|
||||||
$component = CcServiceRegisterQuery::create()->findOneByDbName("pypo");
|
$component = CcServiceRegisterQuery::create()->findOneByDbName("pypo");
|
||||||
$ip = $component->getDbIp();
|
if (is_null($component)){
|
||||||
|
return null;
|
||||||
$docRoot = self::GetMonitStatus($ip);
|
} else {
|
||||||
$data = self::ExtractServiceInformation($docRoot, "airtime-liquidsoap");
|
$ip = $component->getDbIp();
|
||||||
|
|
||||||
|
$docRoot = self::GetMonitStatus($ip);
|
||||||
|
$data = self::ExtractServiceInformation($docRoot, "airtime-liquidsoap");
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function GetShowRecorderStatus(){
|
public static function GetShowRecorderStatus(){
|
||||||
|
|
Loading…
Reference in New Issue