Example #1
0
 public function dispatchLoopShutdown()
 {
     RabbitMq::PushScheduleFinal();
 }
Example #2
0
    //echo "show created, ID: $showId\n";
    // populating the show with a playlist
    $instances = Show::getShows($showTime->format("Y-m-d H:i:s"), $showTime->format("Y-m-d H:i:s"));
    $instance = array_pop($instances);
    $show = new ShowInstance($instance["instance_id"]);
    //echo "Adding playlist to show instance ".$show->getShowInstanceId()."\n";
    $show->scheduleShow(array(1));
    //echo "done\n";
    //$show->scheduleShow(array($playlist->getId()));
}
$showTime = new DateTime();
$resolution = "hour";
$showNumber = 1;
$numberOfDays = 180;
$numberOfHours = 0;
$endDate = new DateTime();
$endDate->add(new DateInterval("P" . $numberOfDays . "DT" . $numberOfHours . "H"));
echo "End date: " . $endDate->format("Y-m-d H:i") . "\n";
while ($showTime < $endDate) {
    echo $showTime->format("Y-m-d H:i") . " < " . $endDate->format("Y-m-d H:i") . "\n";
    if ($resolution == "minute") {
        createTestShow($showNumber, $showTime, "0:01");
        $showTime->add(new DateInterval("PT1M"));
    } elseif ($resolution == "hour") {
        createTestShow($showNumber, $showTime);
        $showTime->add(new DateInterval("PT1H"));
    }
    $showNumber = $showNumber + 1;
}
RabbitMq::PushScheduleFinal();