gmail poll

This commit is contained in:
indifferentketchup
2026-04-08 08:24:13 -05:00
parent 3bf799c5e7
commit 4d53ef179f

View File

@@ -43,7 +43,9 @@ async function poll(client) {
try {
pollCount++;
if (pollCount % 10 === 0) {
logAutomation('Gmail poll summary', null, `polls: ${pollCount}, processed: ${totalProcessed}, skipped: ${totalSkipped}, errors: ${totalErrors}`).catch(() => {});
if (totalProcessed > 0) {
logAutomation('Gmail poll summary', null, `polls: ${pollCount}, processed: ${totalProcessed}, skipped: ${totalSkipped}, errors: ${totalErrors}`).catch(() => {});
}
pollCount = 0; totalProcessed = 0; totalSkipped = 0; totalErrors = 0;
}
console.log('Running poll()...');