diff options
author | Simon Rettberg | 2020-05-19 13:29:31 +0200 |
---|---|---|
committer | Simon Rettberg | 2020-05-19 13:29:31 +0200 |
commit | c978486455f5f3a4bc403c7601518949cedb2bea (patch) | |
tree | 08013f71ea6b697b662327967ce245889ac5ad48 /modules-available/remoteaccess | |
parent | [remoteaccess] Add permissions, add "delete group" functionality (diff) | |
download | slx-admin-c978486455f5f3a4bc403c7601518949cedb2bea.tar.gz slx-admin-c978486455f5f3a4bc403c7601518949cedb2bea.tar.xz slx-admin-c978486455f5f3a4bc403c7601518949cedb2bea.zip |
[remoteaccess] Remove TODO and debug spam
Diffstat (limited to 'modules-available/remoteaccess')
-rw-r--r-- | modules-available/remoteaccess/inc/remoteaccess.inc.php | 7 | ||||
-rw-r--r-- | modules-available/remoteaccess/page.inc.php | 6 |
2 files changed, 3 insertions, 10 deletions
diff --git a/modules-available/remoteaccess/inc/remoteaccess.inc.php b/modules-available/remoteaccess/inc/remoteaccess.inc.php index 1dbe02c3..fc719b37 100644 --- a/modules-available/remoteaccess/inc/remoteaccess.inc.php +++ b/modules-available/remoteaccess/inc/remoteaccess.inc.php @@ -34,7 +34,8 @@ class RemoteAccess $active = Database::queryFirst("SELECT Count(*) AS cnt FROM machine m INNER JOIN remoteaccess_machine rm USING (machineuuid) WHERE m.locationid IN ($locs) AND m.state = 'IDLE'"); - $wantNum = $row['wolcount'] - (isset($active['cnt']) ? $active['cnt'] : 0); + $active = (isset($active['cnt']) ? $active['cnt'] : 0); + $wantNum = $row['wolcount'] - $active; if ($wantNum <= 0) continue; self::tryWakeMachines($locs, $wantNum); @@ -59,11 +60,9 @@ class RemoteAccess } if (empty($list)) break; // No more clients in this location - error_log('Trying to wake ' . count($list) . " in $locs"); RebootControl::wakeMachines($list, $fails); $num -= count($list) - count($fails); if (!empty($fails)) { - error_log(count($fails) . ' failed'); $failIds = ArrayUtil::flattenByKey($fails, 'machineuuid'); // Reduce time so they won't be marked as wol_in_progress Database::exec('UPDATE remoteaccess_machine SET woltime = :faketime WHERE machineuuid IN (:fails)', @@ -71,7 +70,7 @@ class RemoteAccess } } if ($num > 0) { - error_log("Could not wake $num clients..."); + error_log("Could not wake $num clients in ($locs)..."); } } diff --git a/modules-available/remoteaccess/page.inc.php b/modules-available/remoteaccess/page.inc.php index 27b7ca6b..68781ffa 100644 --- a/modules-available/remoteaccess/page.inc.php +++ b/modules-available/remoteaccess/page.inc.php @@ -1,11 +1,5 @@ <?php -/* - * TODO TODO TODO TODO - * ### PERMISSIONS ### - * TODO TODO TODO TODO - */ - class Page_RemoteAccess extends Page { |