mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Add another safety-net to remove locks if the execution of poller/disco gets aborted or killed
This commit is contained in:
@@ -114,6 +114,7 @@ echo PHP_EOL;
|
||||
|
||||
foreach (dbFetch("SELECT * FROM `devices` WHERE status = 1 AND disabled = 0 $where ORDER BY device_id DESC") as $device) {
|
||||
if (dbGetLock('discovering.' . $device['device_id'])) {
|
||||
register_shutdown_function('dbReleaseLock','discovering.'.$device['device_id']);
|
||||
discover_device($device, $options);
|
||||
dbReleaseLock('discovering.' . $device['device_id']);
|
||||
}
|
||||
|
Reference in New Issue
Block a user