mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
17 lines
277 B
Go
17 lines
277 B
Go
package utils
|
|
|
|
import (
|
|
"github.com/crawlab-team/crawlab/core/constants"
|
|
)
|
|
|
|
func IsCancellable(status string) bool {
|
|
switch status {
|
|
case constants.TaskStatusPending,
|
|
constants.TaskStatusAssigned,
|
|
constants.TaskStatusRunning:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|