change gmail poll
This commit is contained in:
@@ -23,7 +23,7 @@ const {
|
|||||||
const { getGmailClient } = require('./services/gmail');
|
const { getGmailClient } = require('./services/gmail');
|
||||||
const { getNextTicketNumber, checkTicketLimits, getOrCreateTicketCategory, createEmailTicketAsThread, toDiscordSafeName, getSenderLocal } = require('./services/tickets');
|
const { getNextTicketNumber, checkTicketLimits, getOrCreateTicketCategory, createEmailTicketAsThread, toDiscordSafeName, getSenderLocal } = require('./services/tickets');
|
||||||
const { getEmailRouting } = require('./services/guildSettings');
|
const { getEmailRouting } = require('./services/guildSettings');
|
||||||
const { logError, logGmail } = require('./services/debugLog');
|
const { logError, logGmail, logAutomation } = require('./services/debugLog');
|
||||||
const { increment } = require('./services/patternStore');
|
const { increment } = require('./services/patternStore');
|
||||||
|
|
||||||
const Ticket = mongoose.model('Ticket');
|
const Ticket = mongoose.model('Ticket');
|
||||||
@@ -43,7 +43,7 @@ async function poll(client) {
|
|||||||
try {
|
try {
|
||||||
pollCount++;
|
pollCount++;
|
||||||
if (pollCount % 10 === 0) {
|
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;
|
pollCount = 0; totalProcessed = 0; totalSkipped = 0; totalErrors = 0;
|
||||||
}
|
}
|
||||||
console.log('Running poll()...');
|
console.log('Running poll()...');
|
||||||
|
|||||||
Reference in New Issue
Block a user