mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 23:04:04 +00:00
change sqlite to WAL mode
This commit is contained in:
parent
c9c51e47e1
commit
440c178403
2 changed files with 4 additions and 3 deletions
|
@ -17,6 +17,7 @@ class Database {
|
||||||
|
|
||||||
if (! this.sqliteInstance) {
|
if (! this.sqliteInstance) {
|
||||||
this.sqliteInstance = new sqlite3.Database(Database.path);
|
this.sqliteInstance = new sqlite3.Database(Database.path);
|
||||||
|
this.sqliteInstance.run("PRAGMA journal_mode = WAL");
|
||||||
}
|
}
|
||||||
|
|
||||||
const Dialect = require("knex/lib/dialects/sqlite3/index.js");
|
const Dialect = require("knex/lib/dialects/sqlite3/index.js");
|
||||||
|
|
|
@ -646,9 +646,9 @@ async function afterLogin(socket, user) {
|
||||||
// For example, query the edit data first.
|
// For example, query the edit data first.
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
for (let monitorID in monitorList) {
|
for (let monitorID in monitorList) {
|
||||||
await sendHeartbeatList(socket, monitorID);
|
sendHeartbeatList(socket, monitorID);
|
||||||
await sendImportantHeartbeatList(socket, monitorID);
|
sendImportantHeartbeatList(socket, monitorID);
|
||||||
await Monitor.sendStats(io, monitorID, user.id)
|
Monitor.sendStats(io, monitorID, user.id)
|
||||||
}
|
}
|
||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue