mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-02 21:59:00 +02:00
[web] remove scriptRunner from a cron job script (#30871)
* [web] remove scriptRunner from a cron job script * disable eslint check * fix logger params, add error description GitOrigin-RevId: 60cfc32fc62d08283222bf7cdbe846b6c1d4796f
This commit is contained in:
committed by
Copybot
parent
93eacab171
commit
6b575c9235
@@ -1,17 +1,17 @@
|
||||
/* eslint-disable @overleaf/require-script-runner */
|
||||
import logger from '@overleaf/logger'
|
||||
import { processNotifications } from '../modules/notifications/app/src/ProcessNotifications.mjs'
|
||||
import { scriptRunner } from './lib/ScriptRunner.mjs'
|
||||
|
||||
async function main() {
|
||||
console.log('Processing notifications...')
|
||||
logger.info({}, 'Processing notifications...')
|
||||
await processNotifications()
|
||||
console.log('Notifications processed successfully.')
|
||||
logger.info({}, 'Notifications processed successfully.')
|
||||
}
|
||||
|
||||
try {
|
||||
await scriptRunner(main)
|
||||
console.log('Done.')
|
||||
await main()
|
||||
process.exit(0)
|
||||
} catch (error) {
|
||||
console.error({ error })
|
||||
logger.error({ error }, 'error processing notifications')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user