change gmail poll

This commit is contained in:
indifferentketchup
2026-04-07 10:50:44 -05:00
parent e93246cfde
commit 3bf799c5e7

View File

@@ -23,7 +23,7 @@ const {
const { getGmailClient } = require('./services/gmail');
const { getNextTicketNumber, checkTicketLimits, getOrCreateTicketCategory, createEmailTicketAsThread, toDiscordSafeName, getSenderLocal } = require('./services/tickets');
const { getEmailRouting } = require('./services/guildSettings');
const { logError, logGmail } = require('./services/debugLog');
const { logError, logGmail, logAutomation } = require('./services/debugLog');
const { increment } = require('./services/patternStore');
const Ticket = mongoose.model('Ticket');
@@ -43,7 +43,7 @@ async function poll(client) {
try {
pollCount++;
if (pollCount % 10 === 0) {
logGmail('Poll summary', `polls: ${pollCount}, processed: ${totalProcessed}, skipped: ${totalSkipped}, errors: ${totalErrors}`, null, null).catch(() => {});
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()...');