From e479df276fb80ee66174e101a2c7950917761014 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 20 Feb 2022 09:38:52 +0000 Subject: [PATCH] more console info --- app/tasks/usage.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/app/tasks/usage.php b/app/tasks/usage.php index a81e5bbc2..e308aecbe 100644 --- a/app/tasks/usage.php +++ b/app/tasks/usage.php @@ -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 $iterations++; $loopTook = microtime(true) - $loopStart; $now = date('d-m-Y H:i:s', time()); + Console::info("[{$now}] Aggregation took {$loopTook} seconds"); 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 $attempts = 0; $max = 10;