You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wiki/backend/tasks/simple/purge-audit-log.ts

14 lines
400 B

export async function task(): Promise<void> {
WIKI.logger.info('Purging expired audit log entries...')
try {
const purged = await WIKI.models.auditLog.purge()
WIKI.logger.info(`Purged ${purged} expired audit log entries: [ COMPLETED ]`)
} catch (err: any) {
WIKI.logger.error('Purging expired audit log entries: [ FAILED ]')
WIKI.logger.error(err.message)
throw err
}
}