fix: Use memcached to lock daily processes on Distributed Pollers (#7735)

* fix: use memcached to lock daily processes on Distributed Pollers

* All the locks!
This commit is contained in:
Tony Murray
2017-11-24 03:37:52 -06:00
committed by Neil Lathwood
parent 9c0a74debb
commit 2e73b75297
13 changed files with 603 additions and 230 deletions

View File

@@ -11,6 +11,8 @@
* @copyright (C) 2006 - 2012 Adam Armstrong
*/
use LibreNMS\Util\FileLock;
$init_modules = array('discovery');
require __DIR__ . '/includes/init.php';
@@ -33,7 +35,7 @@ if (isset($options['h'])) {
$where = ' ';
$doing = 'all';
} elseif ($options['h'] == 'new') {
$new_discovery_lock = \LibreNMS\FileLock::lockOrDie('new-discovery');
$new_discovery_lock = FileLock::lockOrDie('new-discovery');
$where = 'AND `last_discovered` IS NULL';
$doing = 'new';
} elseif ($options['h']) {