Fix: force Poll Full REST every cycle for group_0 (alarmed) branches — updates Verif timestamp on dashboard

This commit is contained in:
cheveguerra
2026-07-26 19:10:02 +00:00
parent af250bae77
commit 667ceeddc9
+5 -2
View File
@@ -2253,9 +2253,12 @@ def run_update(accounts=None, exclude=None, full_refresh=False):
needs_full_update = prev_loc.get('needs_full_update', False) needs_full_update = prev_loc.get('needs_full_update', False)
last_dl_epoch = prev_loc.get('last_download_epoch', 0) last_dl_epoch = prev_loc.get('last_download_epoch', 0)
antiguedad_seg = time.time() - last_dl_epoch if last_dl_epoch else 999999 antiguedad_seg = time.time() - last_dl_epoch if last_dl_epoch else 999999
reason = None reason = None
if full_refresh: if loc_id in group_0_ids:
# Sucursal con ALARMA ACTIVA: siempre Poll Full, sin importar antigüedad
reason = "Alarma activa — consulta forzada en cada ciclo"
elif full_refresh:
reason = "Refresco total manual solicitado" reason = "Refresco total manual solicitado"
elif not prev_loc: elif not prev_loc:
reason = "Arranque en frío (sin caché previa)" reason = "Arranque en frío (sin caché previa)"