mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
wait for all locks to be free when updating schema
This commit is contained in:
@ -34,7 +34,11 @@ if (!isset($debug)) {
|
|||||||
if (!dbGetLock('schema_update')) {
|
if (!dbGetLock('schema_update')) {
|
||||||
echo "Schema update already in progress. Exiting";
|
echo "Schema update already in progress. Exiting";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
} //end if
|
||||||
|
|
||||||
|
do {
|
||||||
|
sleep(1);
|
||||||
|
} while (@dbFetchCell('SELECT COUNT(*) FROM `devices` WHERE NOT IS_FREE_LOCK(CONCAT("polling.", device_id)) OR NOT IS_FREE_LOCK(CONCAT("queued.", device_id)) OR NOT IS_FREE_LOCK(CONCAT("discovering.", device_id))') > 0);
|
||||||
|
|
||||||
$insert = 0;
|
$insert = 0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user