1
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2024-11-28 08:48:45 +02:00

Merge pull request #2961 from chakflying/feat/flush-wal

Chore: Flush WAL on shutdown
This commit is contained in:
Louis Lam 2023-04-11 18:53:58 +08:00 committed by GitHub
commit 6356b1e50a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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