- fixed bug in calculate max parallelCount in tasksch.RunTask
- multi-task for stores in jd.SyncStoreSkus - calculate platform price use platform price_percentage. - GoodsOrder json StoreName.
This commit is contained in:
@@ -83,12 +83,12 @@ func RunTask(taskName string, isContinueWhenError bool, resultHandler ResultHand
|
||||
if parallelCount > MaxParallelCount || parallelCount == 0 {
|
||||
parallelCount = MaxParallelCount
|
||||
}
|
||||
listLen := jxutils.GetSliceLen(itemList)
|
||||
if parallelCount > listLen {
|
||||
parallelCount = listLen
|
||||
}
|
||||
realItemList := utils.Interface2Slice(itemList)
|
||||
jobList := jxutils.SplitSlice(realItemList, batchSize)
|
||||
jobListLen := jxutils.GetSliceLen(jobList)
|
||||
if parallelCount > jobListLen {
|
||||
parallelCount = jobListLen
|
||||
}
|
||||
task := &Task{
|
||||
ID: utils.GetUUID(),
|
||||
Name: taskName,
|
||||
|
||||
Reference in New Issue
Block a user