diff --git a/gmail-poll.js b/gmail-poll.js index 9bf31af..ab9ef8f 100644 --- a/gmail-poll.js +++ b/gmail-poll.js @@ -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()...');