diff --git a/core/autocomplete/cache.ts b/core/autocomplete/cache.ts index dc3b706b3..5005480bf 100644 --- a/core/autocomplete/cache.ts +++ b/core/autocomplete/cache.ts @@ -20,7 +20,7 @@ export class AutocompleteLruCache { driver: sqlite3.Database, }); - db.exec("PRAGMA busy_timeout = 3000;"); + await db.exec("PRAGMA busy_timeout = 3000;"); await db.run(` CREATE TABLE IF NOT EXISTS cache ( diff --git a/core/indexing/docs/DocsService.ts b/core/indexing/docs/DocsService.ts index f76a8c921..271f9cead 100644 --- a/core/indexing/docs/DocsService.ts +++ b/core/indexing/docs/DocsService.ts @@ -475,7 +475,7 @@ export default class DocsService { driver: sqlite3.Database, }); - db.exec("PRAGMA busy_timeout = 3000;"); + await db.exec("PRAGMA busy_timeout = 3000;"); await runSqliteMigrations(db); diff --git a/core/indexing/refreshIndex.ts b/core/indexing/refreshIndex.ts index 8446e504f..51cbdb646 100644 --- a/core/indexing/refreshIndex.ts +++ b/core/indexing/refreshIndex.ts @@ -92,7 +92,7 @@ export class SqliteDb { driver: sqlite3.Database, }); - SqliteDb.db.exec("PRAGMA busy_timeout = 3000;"); + await SqliteDb.db.exec("PRAGMA busy_timeout = 3000;"); await SqliteDb.createTables(SqliteDb.db); diff --git a/core/util/devdataSqlite.ts b/core/util/devdataSqlite.ts index 89e0187d6..103140c0d 100644 --- a/core/util/devdataSqlite.ts +++ b/core/util/devdataSqlite.ts @@ -79,8 +79,8 @@ export class DevDataSqliteDb { driver: sqlite3.Database, }); - DevDataSqliteDb.db.exec("PRAGMA busy_timeout = 3000;"); - + await DevDataSqliteDb.db.exec("PRAGMA busy_timeout = 3000;"); + await DevDataSqliteDb.createTables(DevDataSqliteDb.db!); return DevDataSqliteDb.db;