From 59ee62591c4db27be13c5f952a2237e87b16d3d9 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Thu, 23 Jul 2026 12:00:09 -0500 Subject: [PATCH] chore: bajar intervalo scheduler a 20 segundos Co-Authored-By: Claude Sonnet 4.6 --- app/templates/envios_erp.html | 4 ++-- main.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/templates/envios_erp.html b/app/templates/envios_erp.html index 10e6712..e4fd516 100644 --- a/app/templates/envios_erp.html +++ b/app/templates/envios_erp.html @@ -14,7 +14,7 @@ @@ -195,7 +195,7 @@ async function pollSchedulerStatus() { const live = document.getElementById('sched-live'); if (d.running && d.job_exists) { dot.className = 'w-2 h-2 rounded-full bg-green-400 animate-pulse'; - label.textContent = 'Activo — cada 1 minuto'; + label.textContent = 'Activo — cada 20 segundos'; label.className = 'text-green-600'; } else { dot.className = 'w-2 h-2 rounded-full bg-red-400'; diff --git a/main.py b/main.py index e233f61..1f97f2f 100644 --- a/main.py +++ b/main.py @@ -83,7 +83,7 @@ async def startup(): None, origen="scheduler", modo="upsert" ) - _scheduler.add_job(_job_sync, "interval", minutes=1, id="wa_sync_recientes", + _scheduler.add_job(_job_sync, "interval", seconds=20, id="wa_sync_recientes", max_instances=1, coalesce=True) _scheduler.start()