eventlog: getAll -> list

This commit is contained in:
Girish Ramakrishnan
2021-08-20 11:27:35 -07:00
parent aa6b845c9c
commit dd16866e5a
4 changed files with 11 additions and 11 deletions

View File

@@ -195,7 +195,7 @@ async function backupFailed(eventId, taskId, errorMessage) {
await add(eventId, 'Backup failed', `Backup failed: ${errorMessage}. Logs are available [here](/logs.html?taskId=${taskId}).`);
// only send mail if the past 3 automated backups failed
const backupEvents = await eventlog.getAllPaged([eventlog.ACTION_BACKUP_FINISH], null /* search */, 1, 20);
const backupEvents = await eventlog.listPaged([eventlog.ACTION_BACKUP_FINISH], null /* search */, 1, 20);
let count = 0;
for (const event of backupEvents) {
if (!event.data.errorMessage) return; // successful backup (manual or cron)