5f7e81aafc
GitOrigin-RevId: ea6890f2726cba268f1e5eead0643d03757b8dff
22 lines
623 B
JavaScript
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)
|
|
}
|