Add scan concurrency and login delay sliders
Serialised logins now sleep `login_delay` seconds between each SSH auth to prevent AD/LDAP lockout. Both max sessions (1-10) and login delay (0-15s) are configurable via UI sliders in the header and passed as JSON to all scan endpoints. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -26,7 +26,7 @@ scan_state = {
|
||||
}
|
||||
|
||||
|
||||
def run_scan(dept: str = None):
|
||||
def run_scan(dept: str = None, workers: int = 5, login_delay: int = 3):
|
||||
"""
|
||||
Full scan: fetch switch IPs from NocoDB → SSH all → parse → store → export.
|
||||
dept: None = all active switches, "ELEC" or "GW" = dept-filtered.
|
||||
@@ -105,7 +105,7 @@ def run_scan(dept: str = None):
|
||||
"error": result.get("error", "Unknown error")
|
||||
})
|
||||
|
||||
scan_all_switches(switches, progress_callback=on_progress)
|
||||
scan_all_switches(switches, progress_callback=on_progress, max_workers=workers, login_delay=login_delay)
|
||||
|
||||
try:
|
||||
merge_duplicate_switches()
|
||||
|
||||
Reference in New Issue
Block a user