1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
Oinktube/plugin/Scheduler/run.php
2021-07-02 10:21:54 -03:00

26 lines
No EOL
730 B
PHP

<?php
//streamer config
require_once dirname(__FILE__) . '/../../videos/configuration.php';
if (!isCommandLineInterface()) {
return die('Command Line only');
}
if(!AVideoPlugin::isEnabledByName('Scheduler')){
return die('Scheduler is disabled');
}
$rowActive = Scheduler_commands::getAllActive();
$total = count($rowActive);
_error_log("Scheduler::run There are {$total} active requests");
$rows = Scheduler_commands::getAllActiveAndReady();
$time = getDatabaseTime();
//var_dump($time, date('Y-m-d H:i:s', $time), $rows);
foreach ($rows as $value) {
$id = Scheduler::run($value['id']);
if(empty($id)){
_error_log("Scheduler::run error [{$value['id']}] callbackURL={$value['callbackURL']}");
}
}