(ctx *TaskContext)
| 368 | } |
| 369 | |
| 370 | func (service *TaskService) defaultLogCounterInfo(ctx *TaskContext) error { |
| 371 | showInfos := []*ShowCountInfo{} |
| 372 | for _, t := range service.GetAllTasks() { |
| 373 | //service.Logger().Debug(t.TaskID(), " Start:", t.CounterInfo().StartTime.Format(fullTimeLayout), " RUN:", t.CounterInfo().RunCounter.Count(), " ERROR:", t.CounterInfo().ErrorCounter.Count()) |
| 374 | showInfos = append(showInfos, &ShowCountInfo{TaskID: t.TaskID(), Lable: "RUN", Count: t.CounterInfo().RunCounter.Count()}) |
| 375 | showInfos = append(showInfos, &ShowCountInfo{TaskID: t.TaskID(), Lable: "ERROR", Count: t.CounterInfo().ErrorCounter.Count()}) |
| 376 | } |
| 377 | if len(showInfos) > 0 { |
| 378 | str, _ := json.Marshal(showInfos) |
| 379 | service.Logger().Debug(string(str)) |
| 380 | } |
| 381 | return nil |
| 382 | } |
| 383 | |
| 384 | // ValidateTaskType validate the TaskType is supported |
| 385 | func ValidateTaskType(taskType string) bool { |
nothing calls this directly
no test coverage detected