Files
Verso/services/web/scripts/process_notifications.mjs
T
Kristina 5f7e81aafc [web] add stats to process_notifications cron (#34049)
GitOrigin-RevId: ea6890f2726cba268f1e5eead0643d03757b8dff
2026-05-29 08:05:42 +00:00

22 lines
623 B
JavaScript

/* eslint-disable @overleaf/require-script-runner */
import logger from '@overleaf/logger'
import { processNotifications } from '../modules/notifications/app/src/ProcessNotifications.mjs'
async function main() {
logger.info({}, 'Processing notifications...')
const { notificationsFound, notificationsReady, emailsSent } =
await processNotifications()
logger.info(
{ notificationsFound, notificationsReady, emailsSent },
'Notifications processed successfully.'
)
}
try {
await main()
process.exit(0)
} catch (error) {
logger.error({ error }, 'error processing notifications')
process.exit(1)
}