增加初始化等待

This commit is contained in:
fumiama
2022-01-31 00:39:39 +08:00
parent 0770c6e4a1
commit ca18a323e3
19 changed files with 50 additions and 12 deletions

View File

@@ -5,6 +5,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/FloatTech/ZeroBot-Plugin/order"
"github.com/FloatTech/zbputils/file"
"github.com/FloatTech/zbputils/process"
)
@@ -22,6 +23,7 @@ const (
// 加载数据库
func init() {
go func() {
defer order.DoneOnExit()()
process.SleepAbout1sTo2s()
_ = os.MkdirAll(dbpath, 0755)
_, err := file.GetLazyData(dbfile, false, true)