From 4850e5a3b5ab8fb0a652779128e7097261abbdb5 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 2 May 2022 17:07:27 +0200 Subject: [rebootcontrol] Show location for automated WOL test tasks --- modules-available/rebootcontrol/hooks/cron.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules-available/rebootcontrol') diff --git a/modules-available/rebootcontrol/hooks/cron.inc.php b/modules-available/rebootcontrol/hooks/cron.inc.php index 73de020d..c10e8626 100644 --- a/modules-available/rebootcontrol/hooks/cron.inc.php +++ b/modules-available/rebootcontrol/hooks/cron.inc.php @@ -155,7 +155,7 @@ Database::exec('DELETE FROM reboot_subnet WHERE fixed = 0 AND lastseen < :cutoff // Get machines running, group by subnet $cutoff = time() - 301; // Really only the ones that didn't miss the most recent update -$res = Database::simpleQuery("SELECT s.subnetid, s.end AS bcast, m.machineuuid, m.clientip, m.macaddr +$res = Database::simpleQuery("SELECT s.subnetid, s.end AS bcast, m.machineuuid, m.clientip, m.macaddr, m.locationid FROM reboot_subnet s INNER JOIN machine m ON ( (m.state = 'IDLE' OR m.state = 'OCCUPIED') @@ -177,6 +177,7 @@ foreach ($res as $row) { } Stuff::$subnets[$row['subnetid']][] = $row; } +unset($res); $task = Taskmanager::submit('DummyTask', []); $task = Taskmanager::waitComplete($task, 4000); -- cgit v1.2.3-55-g7522