Move where wal is set

This commit is contained in:
Natsumi
2024-10-30 14:22:24 +13:00
parent 64947e57cb
commit 01a35fa007
3 changed files with 1 additions and 6 deletions

View File

@@ -30,7 +30,7 @@ namespace VRCX
if (!string.IsNullOrEmpty(jsonDataSource))
dataSource = jsonDataSource;
m_Connection = new SQLiteConnection($"Data Source=\"{dataSource}\";Version=3;PRAGMA locking_mode=NORMAL;PRAGMA busy_timeout=5000", true);
m_Connection = new SQLiteConnection($"Data Source=\"{dataSource}\";Version=3;PRAGMA locking_mode=NORMAL;PRAGMA busy_timeout=5000;PRAGMA journal_mode=WAL;", true);
m_Connection.Open();
}

View File

@@ -27599,7 +27599,6 @@ speechSynthesis.getVoices();
await database.fixBrokenGroupChange(); // fix spam group left & name change
await database.fixCancelFriendRequestTypo(); // fix CancelFriendRequst typo
await database.vacuum(); // succ
await database.setWal(); // https://www.sqlite.org/wal.html
await configRepository.setInt(
'VRCX_databaseVersion',
databaseVersion

View File

@@ -2620,10 +2620,6 @@ class Database {
await sqliteService.executeNonQuery('VACUUM');
}
async setWal() {
await sqliteService.executeNonQuery('PRAGMA journal_mode=WAL');
}
async getInstanceJoinHistory() {
var oneWeekAgo = new Date(Date.now() - 604800000).toJSON();
var instances = new Map();