SAAS-794: Schedule/get-current-playlist can take too long to respond

small fix
This commit is contained in:
drigato 2015-05-22 08:51:32 -04:00
parent b80c102e99
commit 5330859f00

View file

@ -153,7 +153,7 @@ SQL;
$sql = "select s.id, s.starts, s.ends, s.file_id, s.stream_id, s.media_item_played,
s.instance_id, si.ends as show_ends from cc_schedule s left join cc_show_instances si
on s.instance_id = si.id where s.playout_status > 0 and s.starts <= :p1
and s.ends >= :p2 order by starts limit 1";
and s.ends >= :p2 order by starts desc limit 1";
$params = array(
":p1" => $utcNow->format("Y-m-d H:i:s"),