mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 00:24:21 +02:00
Revert all PHP-Based MySQL Locks introduced in #1584
This commit is contained in:
+1
-12
@@ -105,19 +105,8 @@ if ($config['distributed_poller'] === true) {
|
||||
$where .= ' AND poller_group IN('.$config['distributed_poller_group'].')';
|
||||
}
|
||||
|
||||
echo 'Checking for MySQL Locks:';
|
||||
while (!dbCheckLock('schema_update')) {
|
||||
echo '.';
|
||||
sleep(1);
|
||||
}
|
||||
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']);
|
||||
}
|
||||
discover_device($device, $options);
|
||||
}
|
||||
|
||||
$end = utime();
|
||||
|
||||
Reference in New Issue
Block a user