Add try catch in dump database

This commit is contained in:
Ajay Ramachandran 2021-07-03 17:26:59 -04:00
parent ce59d3f95f
commit f5cfd6bfb5

View file

@ -197,6 +197,7 @@ async function queueDump(): Promise<void> {
const startTime = Date.now();
updateRunning = true;
try {
await removeOutdatedDumps(appExportPath);
const dumpFiles = [];
@ -213,8 +214,12 @@ async function queueDump(): Promise<void> {
}
latestDumpFiles = [...dumpFiles];
lastUpdate = startTime;
} catch(e) {
Logger.error(e);
} finally {
updateQueued = false;
updateRunning = false;
lastUpdate = startTime;
}
}
}