mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Updated device cache support (#10795)
* Device Cache also some additional device related models * attribs from cache * replace common attribute functions * remove legacy cache usage tidy up some collection manipulation remove some unused or single use functions * cleanup some items * always return a device, to prevent bugs * clear device cache when testing after each test * fix double assignment * Clean up function to take advantage of null object
This commit is contained in:
committed by
Neil Lathwood
parent
d1c73b14f3
commit
dec9a498ee
@@ -232,14 +232,11 @@ function poll_device($device, $force_module = false)
|
||||
|
||||
$device_start = microtime(true);
|
||||
|
||||
$attribs = get_dev_attribs($device['device_id']);
|
||||
$attribs = DeviceCache::getPrimary()->getAttribs();
|
||||
$device['attribs'] = $attribs;
|
||||
|
||||
load_os($device);
|
||||
|
||||
$device['snmp_max_repeaters'] = $attribs['snmp_max_repeaters'];
|
||||
$device['snmp_max_oid'] = $attribs['snmp_max_oid'];
|
||||
|
||||
unset($array);
|
||||
|
||||
// Start counting device poll time
|
||||
|
Reference in New Issue
Block a user