新增测点配置

This commit is contained in:
2024-09-03 15:52:38 +08:00
parent bfb284c4cc
commit 3b53e9f9b7
37 changed files with 429 additions and 66 deletions

24
jobs/test.go Normal file
View File

@@ -0,0 +1,24 @@
package jobs
import (
"energy-management-system/utils/exception"
"energy-management-system/utils/recovery"
"fmt"
"reflect"
"runtime"
)
type Test struct {
Name string
}
func (t *Test) Run() {
defer recovery.CronRecovery(runtime.FuncForPC(reflect.ValueOf(t.Run).Pointer()).Name())
exception.PM("定时任务错误")
//t.GetJobName()
fmt.Println(t.GetJobName() + "Test Run")
}
func (t *Test) GetJobName() string {
return t.Name
}