When SQLITE_CORRUPT error happens, immediately restart the app
This commit is contained in:
@@ -281,6 +281,14 @@ function _updateJob(id, data) {
|
||||
window.log.info(
|
||||
`SQL channel job ${id} (${fnName}) failed in ${end - start}ms`
|
||||
);
|
||||
|
||||
if (error && error.message && error.message.includes('SQLITE_CORRUPT')) {
|
||||
window.log.error(
|
||||
'Detected SQLITE_CORRUPT error; restarting the application immediately'
|
||||
);
|
||||
window.restart();
|
||||
}
|
||||
|
||||
return reject(error);
|
||||
},
|
||||
};
|
||||
|
Reference in New Issue
Block a user