MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _get_or_create

Function _get_or_create

webapp_modern.py:2129–2139  ·  view source on GitHub ↗
(ssid: Optional[str], bssid: Optional[str])

Source from the content-addressed store, hash-verified

2127
2128def _ni_load_memory():
2129 """Load the persisted alert memory once per process."""
2130 global _ni_memory_loaded
2131 if _ni_memory_loaded:
2132 return
2133 _ni_memory_loaded = True
2134 try:
2135 with open(_ni_store_path()) as f:
2136 data = json.load(f)
2137 for k, v in (data.items() if isinstance(data, dict) else ()):
2138 if isinstance(v, dict) and 'rank' in v:
2139 _ni_alert_memory[k] = {
2140 'rank': int(v.get('rank', 1)),
2141 'ts': float(v.get('ts', 0) or 0),
2142 'clean_since': (float(v['clean_since'])

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected