mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-27 16:54:04 +00:00
Set PRAGMA synchronous = FULL
This commit is contained in:
parent
355aec46dc
commit
fee88b32e3
1 changed files with 5 additions and 1 deletions
|
@ -55,7 +55,6 @@ class Database {
|
||||||
"patch-monitor-basic-auth.sql": true,
|
"patch-monitor-basic-auth.sql": true,
|
||||||
"patch-status-page.sql": true,
|
"patch-status-page.sql": true,
|
||||||
"patch-proxy.sql": true,
|
"patch-proxy.sql": true,
|
||||||
"patch-monitor-expiry-notification.sql": true,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -126,6 +125,11 @@ class Database {
|
||||||
await R.exec("PRAGMA cache_size = -12000");
|
await R.exec("PRAGMA cache_size = -12000");
|
||||||
await R.exec("PRAGMA auto_vacuum = FULL");
|
await R.exec("PRAGMA auto_vacuum = FULL");
|
||||||
|
|
||||||
|
// This ensures that an operating system crash or power failure will not corrupt the database.
|
||||||
|
// FULL synchronous is very safe, but it is also slower.
|
||||||
|
// Read more: https://sqlite.org/pragma.html#pragma_synchronous
|
||||||
|
await R.exec("PRAGMA synchronous = FULL");
|
||||||
|
|
||||||
console.log("SQLite config:");
|
console.log("SQLite config:");
|
||||||
console.log(await R.getAll("PRAGMA journal_mode"));
|
console.log(await R.getAll("PRAGMA journal_mode"));
|
||||||
console.log(await R.getAll("PRAGMA cache_size"));
|
console.log(await R.getAll("PRAGMA cache_size"));
|
||||||
|
|
Loading…
Reference in a new issue