fix: correct column names in scheduler status query (total, errores)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
467a24baa4
commit
12f5f1388d
@@ -202,7 +202,7 @@ async function pollSchedulerStatus() {
|
|||||||
if (d.ultimo_log) {
|
if (d.ultimo_log) {
|
||||||
const ul = d.ultimo_log;
|
const ul = d.ultimo_log;
|
||||||
const ts = new Date(ul.created_at).toLocaleTimeString('es-CO');
|
const ts = new Date(ul.created_at).toLocaleTimeString('es-CO');
|
||||||
parts.push(`<span><i class="fas fa-history mr-1 text-purple-400"></i>Último sync scheduler: <strong>${ts}</strong> · ${ul.total_procesados ?? 0} procesados, ${ul.total_errores ?? 0} errores</span>`);
|
parts.push(`<span><i class="fas fa-history mr-1 text-purple-400"></i>Último sync scheduler: <strong>${ts}</strong> · ${ul.total ?? 0} procesados, ${ul.errores ?? 0} errores</span>`);
|
||||||
}
|
}
|
||||||
live.innerHTML = parts.join('');
|
live.innerHTML = parts.join('');
|
||||||
} catch(_) {}
|
} catch(_) {}
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ async def scheduler_status():
|
|||||||
next_run = job.next_run_time.isoformat() if job and job.next_run_time else None
|
next_run = job.next_run_time.isoformat() if job and job.next_run_time else None
|
||||||
conn = get_connection()
|
conn = get_connection()
|
||||||
row = conn.execute(
|
row = conn.execute(
|
||||||
"SELECT created_at, total_procesados, total_errores, origen "
|
"SELECT created_at, total, errores, origen "
|
||||||
"FROM sync_wa_log WHERE origen='scheduler' ORDER BY id DESC LIMIT 1"
|
"FROM sync_wa_log WHERE origen='scheduler' ORDER BY id DESC LIMIT 1"
|
||||||
).fetchone()
|
).fetchone()
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user