✏️ 修复 sql 加载失败

This commit is contained in:
fumiama 2021-11-22 21:48:22 +08:00
parent 0e026a8b3b
commit 37e36fb886
2 changed files with 7 additions and 3 deletions

View File

@ -5,11 +5,15 @@ import (
log "github.com/sirupsen/logrus"
"github.com/FloatTech/ZeroBot-Plugin/plugin_vtb_quotation/model"
"github.com/FloatTech/ZeroBot-Plugin/utils/process"
)
func init() {
log.Println("[vtb/cron] 开启vtb数据库日常更新")
vtbDaily()
go func() {
process.SleepAbout1sTo2s()
log.Println("[vtb/cron] 开启vtb数据库日常更新")
vtbDaily()
}()
}
func vtbDaily() {

View File

@ -20,7 +20,7 @@ type Sqlite struct {
// 返回错误
func (db *Sqlite) Create(table string, objptr interface{}) (err error) {
if db.DB == nil {
database, err := sql.Open("sqlite", db.DBPath)
database, err := sql.Open("sqlite3", db.DBPath)
if err != nil {
return err
}