CC-3620 : Calendar -> Unresponsive script warning when trying to add 300 ogg files
improving speed of js rendering, datatables config is loaded from localstorage, removed aggregate propel behaviour on cc_show_instances time_filled.
This commit is contained in:
parent
ef908ee894
commit
c96c60dc5a
16 changed files with 210 additions and 235 deletions
|
@ -110,6 +110,8 @@ class CcShowInstances extends BaseCcShowInstances {
|
|||
|
||||
//post save hook to update the cc_schedule status column for the tracks in the show.
|
||||
public function updateScheduleStatus(PropelPDO $con) {
|
||||
|
||||
$this->updateDbTimeFilled($con);
|
||||
|
||||
//scheduled track is in the show
|
||||
CcScheduleQuery::create()
|
||||
|
@ -134,6 +136,32 @@ class CcShowInstances extends BaseCcShowInstances {
|
|||
->update(array('DbPlayoutStatus' => 0), $con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Computes the value of the aggregate column time_filled
|
||||
*
|
||||
* @param PropelPDO $con A connection object
|
||||
*
|
||||
* @return mixed The scalar result from the aggregate query
|
||||
*/
|
||||
public function computeDbTimeFilled(PropelPDO $con)
|
||||
{
|
||||
$stmt = $con->prepare('SELECT SUM(clip_length) FROM "cc_schedule" WHERE cc_schedule.INSTANCE_ID = :p1');
|
||||
$stmt->bindValue(':p1', $this->getDbId());
|
||||
$stmt->execute();
|
||||
return $stmt->fetchColumn();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the aggregate column time_filled
|
||||
*
|
||||
* @param PropelPDO $con A connection object
|
||||
*/
|
||||
public function updateDbTimeFilled(PropelPDO $con)
|
||||
{
|
||||
$this->setDbTimeFilled($this->computeDbTimeFilled($con));
|
||||
$this->save($con);
|
||||
}
|
||||
|
||||
public function preInsert(PropelPDO $con = null) {
|
||||
$now = new DateTime("now", new DateTimeZone("UTC"));
|
||||
$this->setDbCreated($now);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue