CC-3131: Latency of stream authentication warning in Stream Settings page
- it compares boot time of liquidsoap and the time user clicks on "Save" on stream setting page. The status only gets updated if the "boot_time" > "user update time" - as soon as a user click on save, status is set to "wating" - since there is no timing issue, quering interval is reduced to 1 sec
This commit is contained in:
parent
85b8209db9
commit
9c65bfeba7
10 changed files with 71 additions and 29 deletions
|
@ -772,15 +772,17 @@ class ApiController extends Zend_Controller_Action
|
|||
|
||||
$error_msg = $request->getParam('error_msg');
|
||||
$stream_id = $request->getParam('stream_id');
|
||||
Application_Model_StreamSetting::setLiquidsoapError($stream_id, $error_msg);
|
||||
$boot_time = $request->getParam('boot_time');
|
||||
Application_Model_StreamSetting::setLiquidsoapError($stream_id, $error_msg, $boot_time);
|
||||
}
|
||||
|
||||
public function updateLiquidsoapConnectionAction(){
|
||||
$request = $this->getRequest();
|
||||
|
||||
$stream_id = $request->getParam('stream_id');
|
||||
$boot_time = $request->getParam('boot_time');
|
||||
// setting error_msg as "" when there is no error_msg
|
||||
Application_Model_StreamSetting::setLiquidsoapError($stream_id, "OK");
|
||||
Application_Model_StreamSetting::setLiquidsoapError($stream_id, "OK", $boot_time);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -203,6 +203,11 @@ class PreferenceController extends Zend_Controller_Action
|
|||
Application_Model_StreamSetting::setStreamSetting($values);
|
||||
$data = array();
|
||||
$data['setting'] = Application_Model_StreamSetting::getStreamSetting();
|
||||
for($i=1;$i<=$num_of_stream;$i++){
|
||||
Application_Model_StreamSetting::setLiquidsoapError($i, "waiting");
|
||||
}
|
||||
// store stream update timestamp
|
||||
Application_Model_Preference::SetStreamUpdateTimestamp();
|
||||
Application_Model_RabbitMq::SendMessageToPypo("update_stream_setting", $data);
|
||||
$this->view->statusMsg = "<div class='success'>Stream Setting Updated.</div>";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue