mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-12 10:10:25 +00:00
✨ 增加初始化等待
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/FloatTech/ZeroBot-Plugin/order"
|
||||
"github.com/FloatTech/zbputils/file"
|
||||
"github.com/FloatTech/zbputils/process"
|
||||
"github.com/FloatTech/zbputils/sql"
|
||||
@@ -20,6 +21,7 @@ var db = &sql.Sqlite{DBPath: dbfile}
|
||||
// 加载数据库
|
||||
func init() {
|
||||
go func() {
|
||||
defer order.DoneOnExit()()
|
||||
process.SleepAbout1sTo2s()
|
||||
// os.RemoveAll(dbpath)
|
||||
_ = os.MkdirAll(dbpath, 0755)
|
||||
|
||||
Reference in New Issue
Block a user