feat:update vue template & sql

This commit is contained in:
zhangwenjian committed 2020-08-13 23:47:37 +08:00
1 parent 826eef40a3
commit afb98f5e81
5 files changed
+177 -174

No files matched your search

+5 -4
View File
@@ -7,10 +7,11 @@ import (
// 需要将定义的struct 添加到字典中;
// 字典 key 可以配置到 自动任务 调用目标 中;
func init() {
var mp = make(map[string]JobsExec, 10)
mp["ExamplesOne"] = ExamplesOne{}
jobList = mp
func InitJob() {
jobList = map[string]JobsExec{
"ExamplesOne": ExamplesOne{},
// ...
}
}
// 新添加的job 必须按照以下格式定义,并实现Exec函数
+1 -5
View File
@@ -36,12 +36,8 @@ type ExecJob struct {
func (e *ExecJob) Run() {
startTime := time.Now()
var mp = jobList
lock.Lock()
var obj = mp[e.InvokeTarget]
lock.Unlock()
var obj = jobList[e.InvokeTarget]
CallExec(obj.(JobsExec))
//fmt.Println("CallExec exec success")
// 结束时间
endTime := time.Now()