NSLOOKUP v0.1.8🚑
This commit is contained in:
@@ -37,8 +37,8 @@
|
||||
"function": "RUN",
|
||||
"events": ["run"],
|
||||
"type": "text.select",
|
||||
"default_value":"on_new_device",
|
||||
"options": ["disabled", "on_new_device", "once", "schedule", "always_after_scan"],
|
||||
"default_value":"before_name_updates",
|
||||
"options": ["disabled", "before_name_updates", "on_new_device", "once", "schedule", "always_after_scan"],
|
||||
"localized": ["name", "description"],
|
||||
"name" :[{
|
||||
"language_code":"en_us",
|
||||
|
||||
@@ -32,6 +32,7 @@ from database import DB
|
||||
from reporting import get_notifications
|
||||
from notification import Notification_obj
|
||||
from plugin import run_plugin_scripts, check_and_run_user_event
|
||||
from device import update_devices_names
|
||||
|
||||
|
||||
#===============================================================================
|
||||
@@ -135,8 +136,15 @@ def main ():
|
||||
pluginsState.processScan = False
|
||||
process_scan(db)
|
||||
|
||||
|
||||
# --------
|
||||
# Reporting
|
||||
# run plugins before notification processing (e.g. Plugins to discover device names)
|
||||
pluginsState = run_plugin_scripts(db, 'before_name_updates', pluginsState)
|
||||
|
||||
# Resolve devices names
|
||||
mylog('debug','[Main] Resolve devices names')
|
||||
update_devices_names(db)
|
||||
|
||||
# Check if new devices found
|
||||
sql.execute (sql_new_devices)
|
||||
newDevices = sql.fetchall()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import conf
|
||||
|
||||
from database import insertOnlineHistory
|
||||
from device import create_new_devices, print_scan_stats, save_scanned_devices, update_devices_data_from_scan, update_devices_names
|
||||
from device import create_new_devices, print_scan_stats, save_scanned_devices, update_devices_data_from_scan
|
||||
from helper import timeNowTZ
|
||||
from logger import mylog
|
||||
from reporting import skip_repeated_notifications
|
||||
@@ -40,10 +40,6 @@ def process_scan (db):
|
||||
mylog('verbose','[Process Scan] Updating Devices Info')
|
||||
update_devices_data_from_scan (db)
|
||||
|
||||
# Resolve devices names
|
||||
mylog('verbose','[Process Scan] Resolve devices names')
|
||||
update_devices_names(db)
|
||||
|
||||
# Void false connection - disconnections
|
||||
mylog('verbose','[Process Scan] Voiding false (ghost) disconnections')
|
||||
void_ghost_disconnections (db)
|
||||
|
||||
Reference in New Issue
Block a user