CC-3404: Change "Now Playing" dashboard SQL query to take advantage of the "playout_status" field in the schedule table
- Updated ApiController to use Schedule's GetPlayOrderRange which has better performance.
This commit is contained in:
parent
1e4d34447a
commit
9e850838ca
|
@ -270,13 +270,8 @@ class ApiController extends Zend_Controller_Action
|
|||
$limit = "5";
|
||||
}
|
||||
|
||||
$result = array("env"=>APPLICATION_ENV,
|
||||
"schedulerTime"=>gmdate("Y-m-d H:i:s"),
|
||||
"currentShow"=>Application_Model_Show::GetCurrentShow($utcTimeNow),
|
||||
"nextShow"=>Application_Model_Show::GetNextShows($utcTimeNow, $limit, $utcTimeEnd),
|
||||
"timezone"=> date("T"),
|
||||
"timezoneOffset"=> date("Z"),
|
||||
"AIRTIME_API_VERSION"=>AIRTIME_API_VERSION); //used by caller to determine if the airtime they are running or widgets in use is out of date.
|
||||
$result = Application_Model_Schedule::GetPlayOrderRange();
|
||||
$result['AIRTIME_API_VERSION'] = AIRTIME_API_VERSION; //used by caller to determine if the airtime they are running or widgets in use is out of date.
|
||||
|
||||
//Convert from UTC to localtime for user.
|
||||
Application_Model_Show::ConvertToLocalTimeZone($result["currentShow"], array("starts", "ends", "start_timestamp", "end_timestamp"));
|
||||
|
|
Loading…
Reference in New Issue