|
@@ -2,14 +2,19 @@ package initialize
|
|
|
|
|
|
import (
|
|
import (
|
|
"fmt"
|
|
"fmt"
|
|
-
|
|
|
|
"github.com/flipped-aurora/gin-vue-admin/server/config"
|
|
"github.com/flipped-aurora/gin-vue-admin/server/config"
|
|
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
|
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
|
"github.com/flipped-aurora/gin-vue-admin/server/utils"
|
|
"github.com/flipped-aurora/gin-vue-admin/server/utils"
|
|
|
|
+ "go.uber.org/zap"
|
|
)
|
|
)
|
|
|
|
|
|
func Timer() {
|
|
func Timer() {
|
|
if global.GVA_CONFIG.Timer.Start {
|
|
if global.GVA_CONFIG.Timer.Start {
|
|
|
|
+ go func() {
|
|
|
|
+ global.GVA_Timer.AddTaskByFunc("UnitIntegralSum", "@every 1m", func() {
|
|
|
|
+ global.GVA_LOG.Error("timer UnitIntegralSum:", zap.Any("time", 111111))
|
|
|
|
+ })
|
|
|
|
+ }()
|
|
for i := range global.GVA_CONFIG.Timer.Detail {
|
|
for i := range global.GVA_CONFIG.Timer.Detail {
|
|
go func(detail config.Detail) {
|
|
go func(detail config.Detail) {
|
|
global.GVA_Timer.AddTaskByFunc("ClearDB", global.GVA_CONFIG.Timer.Spec, func() {
|
|
global.GVA_Timer.AddTaskByFunc("ClearDB", global.GVA_CONFIG.Timer.Spec, func() {
|