mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-09 09:04:04 +08:00
Merge branch 'master' into clear-monitor-data
This commit is contained in:
@@ -13,9 +13,6 @@ class Database {
|
||||
static async connect() {
|
||||
const acquireConnectionTimeout = 120 * 1000;
|
||||
|
||||
R.useBetterSQLite3 = true;
|
||||
R.betterSQLite3Options.timeout = acquireConnectionTimeout;
|
||||
|
||||
R.setup("sqlite", {
|
||||
filename: Database.path,
|
||||
useNullAsDefault: true,
|
||||
@@ -124,11 +121,8 @@ class Database {
|
||||
return statement !== "";
|
||||
})
|
||||
|
||||
// Use better-sqlite3 to run, prevent "This statement does not return data. Use run() instead"
|
||||
const db = await this.getBetterSQLite3Database();
|
||||
|
||||
for (let statement of statements) {
|
||||
db.prepare(statement).run();
|
||||
await R.exec(statement);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user