(name string)
| 109 | } |
| 110 | |
| 111 | func CheckTaskIsExecuting(name string) error { |
| 112 | taskRepo := repo.NewITaskRepo() |
| 113 | task, _ := taskRepo.GetFirst(taskRepo.WithByStatus(constant.StatusExecuting), repo.WithByName(name)) |
| 114 | if task.ID != "" { |
| 115 | return buserr.New("TaskIsExecuting") |
| 116 | } |
| 117 | return nil |
| 118 | } |
| 119 | |
| 120 | func CheckResourceTaskIsExecuting(operate, scope string, resourceID uint) bool { |
| 121 | taskRepo := repo.NewITaskRepo() |
nothing calls this directly
no test coverage detected