Resilience : ecran pause, reconnexion WS auto, watchdog systemd, WiFi monitor
- WebSocket : reconnexion avec backoff exponentiel au lieu de reload page - Ecran pause avec tasse de cafe quand le backend est injoignable - Endpoint /api/health pour monitoring externe - Watchdog systemd (sd_notify READY=1 + WATCHDOG=1 toutes les 10s) - Service systemd durci (Type=notify, WatchdogSec=30, KillMode, limites) - WiFi watchdog : script + timer systemd, verifie la gateway toutes les 60s - Destinations : fallback url_tunnel (WireGuard) en priorite Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -118,9 +118,34 @@ function allerA(ecran) {
|
||||
chargerGalerie();
|
||||
} else if (ecran === 'admin') {
|
||||
chargerAdmin();
|
||||
demarrerTimeoutAdmin();
|
||||
} else {
|
||||
arreterTimeoutAdmin();
|
||||
}
|
||||
}
|
||||
|
||||
let _adminTimeoutId = null;
|
||||
const ADMIN_TIMEOUT_MS = 30000;
|
||||
|
||||
function demarrerTimeoutAdmin() {
|
||||
arreterTimeoutAdmin();
|
||||
_adminTimeoutId = setTimeout(() => { allerA('accueil'); }, ADMIN_TIMEOUT_MS);
|
||||
const ecranAdmin = document.getElementById('ecran-admin');
|
||||
ecranAdmin.removeEventListener('pointerdown', _resetAdminTimeout);
|
||||
ecranAdmin.addEventListener('pointerdown', _resetAdminTimeout);
|
||||
}
|
||||
|
||||
function _resetAdminTimeout() {
|
||||
if (_adminTimeoutId) {
|
||||
clearTimeout(_adminTimeoutId);
|
||||
_adminTimeoutId = setTimeout(() => { allerA('accueil'); }, ADMIN_TIMEOUT_MS);
|
||||
}
|
||||
}
|
||||
|
||||
function arreterTimeoutAdmin() {
|
||||
if (_adminTimeoutId) { clearTimeout(_adminTimeoutId); _adminTimeoutId = null; }
|
||||
}
|
||||
|
||||
function recommencer() {
|
||||
photosSession = [];
|
||||
photoFinale = null;
|
||||
|
||||
Reference in New Issue
Block a user