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.
()
| 19156 | except OSError: |
| 19157 | pass |
| 19158 | |
| 19159 | |
| 19160 | def _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') |
nothing calls this directly
no test coverage detected