refactor: Use the new locks for schema updates (#6931)

* Use the new locks for schema updates

* removed schema lock from discovery

* Add the ability to wait for a lock.
Add unit tests

* Add MysqlLock
Use that for the schema updates
Wait up to 30s for other schema updates to complete.

* Switch the schema lock back to a file lock for now.
Make FileLock support indefinite locking without polling.
Add a warning to MysqlLock for scenarios where it won't work.

* Delete MysqlLock.php

* Removed MySQL lock tests
This commit is contained in:
Tony Murray
2017-07-17 13:35:08 -05:00
committed by Neil Lathwood
parent 1e77d4b3ea
commit 181b0fb7d5
5 changed files with 167 additions and 135 deletions

View File

@@ -114,10 +114,6 @@ if (!$where) {
exit;
}
if (get_lock('schema') === false) {
require 'includes/sql-schema/update.php';
}
update_os_cache(); // will only update if needed
$discovered_devices = 0;