mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
feat: added modules
This commit is contained in:
13
core/utils/task.go
Normal file
13
core/utils/task.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package utils
|
||||
|
||||
import "github.com/crawlab-team/crawlab/core/constants"
|
||||
|
||||
func IsCancellable(status string) bool {
|
||||
switch status {
|
||||
case constants.TaskStatusPending,
|
||||
constants.TaskStatusRunning:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user