This commit is contained in:
gazebo
2018-09-22 23:28:52 +08:00
parent f21b4e614d
commit b936d3354b
10 changed files with 100 additions and 11 deletions

View File

@@ -80,7 +80,7 @@ var (
)
func RunTask(taskName string, isContinueWhenError bool, resultHandler ResultHandlerFunc, parallelCount, batchSize int, userName string, worker WorkFunc, itemList interface{}, params ...interface{}) *Task {
if parallelCount > MaxParallelCount {
if parallelCount > MaxParallelCount || parallelCount == 0 {
parallelCount = MaxParallelCount
}
listLen := jxutils.GetSliceLen(itemList)