mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-18 03:35:10 +08:00
重启时保留-shm,-wal文件
This commit is contained in:
@@ -55,8 +55,6 @@ func (this *IPListDB) init() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var path = this.dir + "/ip_list.db"
|
var path = this.dir + "/ip_list.db"
|
||||||
_ = os.Remove(path + "-shm")
|
|
||||||
_ = os.Remove(path + "-wal")
|
|
||||||
|
|
||||||
db, err := sql.Open("sqlite3", "file:"+path+"?cache=shared&mode=rwc&_journal_mode=WAL&_sync=OFF")
|
db, err := sql.Open("sqlite3", "file:"+path+"?cache=shared&mode=rwc&_journal_mode=WAL&_sync=OFF")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -91,8 +91,6 @@ func (this *Task) Init() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var path = dir + "/metric." + types.String(this.item.Id) + ".db"
|
var path = dir + "/metric." + types.String(this.item.Id) + ".db"
|
||||||
_ = os.Remove(path + "-shm")
|
|
||||||
_ = os.Remove(path + "-wal")
|
|
||||||
|
|
||||||
db, err := sql.Open("sqlite3", "file:"+path+"?cache=shared&mode=rwc&_journal_mode=WAL&_sync=OFF")
|
db, err := sql.Open("sqlite3", "file:"+path+"?cache=shared&mode=rwc&_journal_mode=WAL&_sync=OFF")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user