Skip to content

Commit

Permalink
✏️ 修复 sql 加载失败
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Nov 22, 2021
1 parent 0e026a8 commit 37e36fb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions plugin_vtb_quotation/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion utils/sql/sqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 37e36fb

Please sign in to comment.