We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d47ad95 commit 2cc6815Copy full SHA for 2cc6815
1 file changed
tasks.go
@@ -7,6 +7,7 @@ import (
7
"os"
8
"runtime/debug"
9
"strconv"
10
+ "strings"
11
"sync"
12
)
13
@@ -392,3 +393,15 @@ func (service *TaskService) defaultLogCounterInfo(ctx *TaskContext) error {
392
393
}
394
return nil
395
396
+
397
+// ValidateTaskType validate the TaskType is supported
398
+func ValidateTaskType(taskType string) bool {
399
+ if taskType == "" {
400
+ return false
401
+ }
402
+ checkType := strings.ToLower(taskType)
403
+ if checkType != TaskType_Cron && checkType != TaskType_Loop && checkType != TaskType_Queue {
404
405
406
+ return true
407
+}
0 commit comments