MCPcopy Create free account
hub / github.com/devfeel/dottask / GetAllTaskCountInfo

Method GetAllTaskCountInfo

tasks.go:325–332  ·  view source on GitHub ↗

GetAllTaskCountInfo return all show count info

()

Source from the content-addressed store, hash-verified

323
324// GetAllTaskCountInfo return all show count info
325func (service *TaskService) GetAllTaskCountInfo() []ShowCountInfo {
326 showInfos := []ShowCountInfo{}
327 for _, t := range service.GetAllTasks() {
328 showInfos = append(showInfos, ShowCountInfo{TaskID: t.TaskID(), Lable: "RUN", Count: t.CounterInfo().RunCounter.Count()})
329 showInfos = append(showInfos, ShowCountInfo{TaskID: t.TaskID(), Lable: "ERROR", Count: t.CounterInfo().ErrorCounter.Count()})
330 }
331 return showInfos
332}
333
334// GetAllTasks get all tasks
335func (service *TaskService) GetAllTasks() map[string]Task {

Callers 2

mainFunction · 0.80

Calls 4

GetAllTasksMethod · 0.95
TaskIDMethod · 0.65
CountMethod · 0.65
CounterInfoMethod · 0.65

Tested by

no test coverage detected