MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / CheckTaskIsExecuting

Function CheckTaskIsExecuting

agent/app/task/task.go:111–118  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

109}
110
111func 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
120func CheckResourceTaskIsExecuting(operate, scope string, resourceID uint) bool {
121 taskRepo := repo.NewITaskRepo()

Callers

nothing calls this directly

Calls 2

GetFirstMethod · 0.95
WithByStatusMethod · 0.95

Tested by

no test coverage detected