1
0
Fork 0
mirror of synced 2024-07-03 21:50:34 +12:00

more console info

This commit is contained in:
Damodar Lohani 2022-02-20 09:38:52 +00:00
parent 8707938c75
commit e479df276f

View file

@ -370,18 +370,22 @@ $cli
} }
} }
/**
* Aggregate MariaDB every 15 minutes
* Some of the queries here might contain full-table scans.
*/
if ($iterations % 30 != 0) { // Aggregate aggregate number of objects in database only after 15 minutes if ($iterations % 30 != 0) { // Aggregate aggregate number of objects in database only after 15 minutes
$iterations++; $iterations++;
$loopTook = microtime(true) - $loopStart; $loopTook = microtime(true) - $loopStart;
$now = date('d-m-Y H:i:s', time()); $now = date('d-m-Y H:i:s', time());
Console::info("[{$now}] Aggregation took {$loopTook} seconds");
return; return;
} }
$latestProject = null;
/**
* Aggregate MariaDB every 15 minutes
* Some of the queries here might contain full-table scans.
*/
$now = date('d-m-Y H:i:s', time());
Console::info("[{$now}] Aggregating database counters.");
$latestProject = null;
do { // Loop over all the projects do { // Loop over all the projects
$attempts = 0; $attempts = 0;
$max = 10; $max = 10;