get a lock when doing discovery

This commit is contained in:
Clint Armstrong
2015-07-07 15:53:04 -04:00
parent 67b8f9f473
commit 0588ff41c3

View File

@@ -106,7 +106,9 @@ if ($config['distributed_poller'] === true) {
}
foreach (dbFetch("SELECT * FROM `devices` WHERE status = 1 AND disabled = 0 $where ORDER BY device_id DESC") as $device) {
if (dbGetLock('polling.' . $device['device_id'])) {
discover_device($device, $options);
}
}
$end = utime();