()
| 21 | } |
| 22 | |
| 23 | func main() { |
| 24 | //step 1: init new task service |
| 25 | service = StartNewService() |
| 26 | |
| 27 | service. |
| 28 | //step 2: register all task handler |
| 29 | RegisterHandler("Job_Config", Job_Config). |
| 30 | RegisterHandler("Loop_Config", Loop_Config). |
| 31 | |
| 32 | //step 3: load config file |
| 33 | LoadFileConfig("c:/gotmp/task/task.json.conf", ConfigType_Json). |
| 34 | |
| 35 | //step 4: start all task |
| 36 | StartAllTask() |
| 37 | |
| 38 | fmt.Println(service.PrintAllTasks()) |
| 39 | |
| 40 | for { |
| 41 | time.Sleep(time.Hour) |
| 42 | } |
| 43 | } |
nothing calls this directly
no test coverage detected