db cache time to time.Hour

This commit is contained in:
源文雨
2023-04-11 13:59:33 +08:00
parent 28cb0491f7
commit 8050f12d51
20 changed files with 21 additions and 21 deletions

View File

@@ -41,7 +41,7 @@ func init() {
if _, err := en.GetLazyData("dishes.db", true); err != nil {
logrus.Warnln("[dish]获取菜谱数据库文件失败")
} else if err = db.Open(time.Hour * 24); err != nil {
} else if err = db.Open(time.Hour); err != nil {
logrus.Warnln("[dish]连接菜谱数据库失败")
} else if err = db.Create("dishes", &dish{}); err != nil {
logrus.Warnln("[dish]同步菜谱数据表失败")