优化本地数据库相关代码

This commit is contained in:
刘祥超
2023-10-06 20:56:27 +08:00
parent 69e4dd6cfe
commit c460421279
7 changed files with 28 additions and 9 deletions

View File

@@ -60,7 +60,7 @@ func (this *IPListDB) init() error {
var path = this.dir + "/ip_list.db"
db, err := dbs.OpenWriter("file:" + path + "?cache=shared&mode=rwc&_journal_mode=WAL&_sync=NORMAL&_locking_mode=EXCLUSIVE")
db, err := dbs.OpenWriter("file:" + path + "?cache=shared&mode=rwc&_journal_mode=WAL&_sync=" + dbs.SyncMode + "&_locking_mode=EXCLUSIVE")
if err != nil {
return err
}