eventlog: getAll -> list
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user