Commit f12774e2 authored by dmorley's avatar dmorley
Browse files

count all records on status

parent 6ee92e42
Pipeline #6502 failed with stages
in 51 seconds
......@@ -6,6 +6,15 @@ require_once __DIR__ . '/boot.php';
use Carbon\Carbon;
try {
$total_count = R::getAll('
SELECT count(domain)
FROM pods
');
} catch (\RedBeanPHP\RedException $e) {
die('Error in SQL query: ' . $e->getMessage());
}
$pods_updated_stats = Carbon::createFromFormat('Y-m-d H:i:s.u', getMeta('pods_updated', 'date_created'))->diffInMinutes();
echo "<div class='medium ml-3 mb-5 mt-5'>";
if ($pods_updated_stats < c('status_green')) {
......@@ -15,6 +24,8 @@ if ($pods_updated_stats < c('status_green')) {
}
$pods_updated_stats_human = Carbon::createFromFormat('Y-m-d H:i:s.u', getMeta('pods_updated', 'date_created'))->diffForHumans();
echo "Last update scanned " . $total_count . " sites <br>";
echo "Last data update was " . $pods_updated_stats_human . "<br>";
$last_runtime_human = secondsToTime(getMeta("pods_update_runtime")*60);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment