Feat: Flush WAL on shutdown

pull/2961/head
Nelson Chan 2 years ago
parent 72317633d9
commit ca52047bf5

@ -434,6 +434,9 @@ class Database {
log.info("db", "Closing the database"); log.info("db", "Closing the database");
// Flush WAL to main database
await R.exec("PRAGMA wal_checkpoint(TRUNCATE)");
while (true) { while (true) {
Database.noReject = true; Database.noReject = true;
await R.close(); await R.close();

Loading…
Cancel
Save