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

Function post_ai_pcap_analysis

webapp_modern.py:19158–19171  ·  view source on GitHub ↗

AI root-cause analysis of a PCAP-analysis summary (Wi-Fi/AP client drops). The client posts the JSON returned by /api/net/pcap; we hand it to the AI.

()

Source from the content-addressed store, hash-verified

19156 except OSError:
19157 pass
19158
19159
19160def _launch_post_update(install_deps: bool, warnings: list) -> str:
19161 """Hand the rest of the update to scripts/post_update.sh and let it restart us.
19162
19163 Returns 'systemd' (running in a transient unit, will survive the restart),
19164 'detached' (started, but may be killed by the restart) or 'failed'.
19165
19166 Dependency installs can take minutes on a Pi, far longer than an HTTP
19167 request should live, and they must finish *before* the service comes back or
19168 it restarts into modules it cannot import.
19169
19170 systemd-run is preferred because anything this process spawns stays in the
19171 ragnar.service cgroup and is killed the instant the service restarts -
19172 including the restart command itself. A transient unit escapes that.
19173 """
19174 script = os.path.join(RAGNAR_REPO_PATH, 'scripts', 'post_update.sh')

Callers

nothing calls this directly

Calls 3

analyze_pcapMethod · 0.80
errorMethod · 0.80
is_enabledMethod · 0.45

Tested by

no test coverage detected