update: 自定义gorm的logger优化

This commit is contained in:
SliverHorn
2021-07-09 21:52:17 +08:00
parent f112a056be
commit a4623373a7
4 changed files with 28 additions and 65 deletions

View File

@@ -10,7 +10,6 @@ import (
func Timer() {
if global.GVA_CONFIG.Timer.Start {
for _, detail := range global.GVA_CONFIG.Timer.Detail {
fmt.Println(detail)
go func(detail config.Detail) {
global.GVA_Timer.AddTaskByFunc("ClearDB", global.GVA_CONFIG.Timer.Spec, func() {
err := utils.ClearTable(global.GVA_DB, detail.TableName, detail.CompareField, detail.Interval)