mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 08:02:23 +02:00
add mysql lock for polling
This commit is contained in:
+5
-3
@@ -110,9 +110,11 @@ if (!isset($query)) {
|
||||
|
||||
foreach (dbFetch($query) as $device) {
|
||||
$device = dbFetchRow("SELECT * FROM `devices` WHERE `device_id` = '".$device['device_id']."'");
|
||||
poll_device($device, $options);
|
||||
RunRules($device['device_id']);
|
||||
echo "\r\n";
|
||||
if (dbGetLock('polling.' . $device['device_id'])) {
|
||||
poll_device($device, $options);
|
||||
RunRules($device['device_id']);
|
||||
echo "\r\n";
|
||||
}
|
||||
$polled_devices++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user