diff --git a/airtime_mvc/application/models/Scheduler.php b/airtime_mvc/application/models/Scheduler.php index 51b964589..e5ecd707c 100644 --- a/airtime_mvc/application/models/Scheduler.php +++ b/airtime_mvc/application/models/Scheduler.php @@ -955,6 +955,10 @@ class Application_Model_Scheduler $this->con->beginTransaction(); try { + //Increase the transaction isolation level to prevent two concurrent requests from potentially resulting + //in tracks scheduled at the same time. + $this->con->exec("SET TRANSACTION ISOLATION LEVEL SERIALIZABLE"); + $this->validateMediaItems($mediaItems); //Check for missing files, etc. $this->validateRequest($scheduleItems, true); @@ -1005,6 +1009,9 @@ class Application_Model_Scheduler //$this->con->useDebug(true); try { + //Increase the transaction isolation level to prevent two concurrent requests from potentially resulting + //in tracks scheduled at the same time. + $this->con->exec("SET TRANSACTION ISOLATION LEVEL SERIALIZABLE"); $this->validateItemMove($selectedItems, $afterItems[0]); $this->validateRequest($selectedItems);