1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00

Reduce logs

This commit is contained in:
DanieL 2022-07-08 12:32:10 -03:00
parent e35edcc76e
commit 95e395984d

View file

@ -16,6 +16,11 @@ $total1 = count($rowActive);
$rows = Scheduler_commands::getAllActiveAndReady(); $rows = Scheduler_commands::getAllActiveAndReady();
$total2 = count($rows); $total2 = count($rows);
$rows2 = Scheduler_commands::getAllScheduledTORepeat();
$total3 = count($rows2);
_log("There are {$total1} active requests; getAllActiveAndReady={$total2} getAllScheduledTORepeat={$total3} on time ". json_encode(Scheduler_commands::getTimesNow()));
foreach ($rows as $value) { foreach ($rows as $value) {
_log("getAllActiveAndReady run ". json_encode($value)); _log("getAllActiveAndReady run ". json_encode($value));
$id = Scheduler::run($value['id']); $id = Scheduler::run($value['id']);
@ -24,11 +29,7 @@ foreach ($rows as $value) {
} }
} }
foreach ($rows2 as $value) {
$rows = Scheduler_commands::getAllScheduledTORepeat();
$total3 = count($rows);
_log("There are {$total1} active requests; getAllActiveAndReady={$total2} getAllScheduledTORepeat={$total3} on time ". json_encode(Scheduler_commands::getTimesNow()));
foreach ($rows as $value) {
_log("getAllScheduledTORepeat run ". json_encode($value)); _log("getAllScheduledTORepeat run ". json_encode($value));
$id = Scheduler::run($value['id']); $id = Scheduler::run($value['id']);
if(empty($id)){ if(empty($id)){