mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
refactor: Added lock support to ./discovery.php -h new to prevent overlap (#6568)
This commit is contained in:
committed by
Tony Murray
parent
a475069c9b
commit
5f6279d28c
@@ -33,6 +33,7 @@ if (isset($options['h'])) {
|
||||
$where = ' ';
|
||||
$doing = 'all';
|
||||
} elseif ($options['h'] == 'new') {
|
||||
set_lock('new-discovery');
|
||||
$where = 'AND `last_discovered` IS NULL';
|
||||
$doing = 'new';
|
||||
} elseif ($options['h']) {
|
||||
@@ -137,6 +138,7 @@ if ($discovered_devices) {
|
||||
if ($doing === 'new') {
|
||||
// We have added a new device by this point so we might want to do some other work
|
||||
oxidized_reload_nodes();
|
||||
release_lock('new-discovery');
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user