|
|
@ -228,11 +228,11 @@ public class TaskQueueZkImpl extends AbstractZKClient implements ITaskQueue { |
|
|
|
int j = 0; |
|
|
|
int j = 0; |
|
|
|
List<String> taskslist = new ArrayList<>(tasksNum); |
|
|
|
List<String> taskslist = new ArrayList<>(tasksNum); |
|
|
|
while(iterator.hasNext()){ |
|
|
|
while(iterator.hasNext()){ |
|
|
|
if(j++ < tasksNum){ |
|
|
|
if(j++ >= tasksNum){ |
|
|
|
String task = iterator.next(); |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
taskslist.add(getOriginTaskFormat(task)); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
String task = iterator.next(); |
|
|
|
|
|
|
|
taskslist.add(getOriginTaskFormat(task)); |
|
|
|
} |
|
|
|
} |
|
|
|
return taskslist; |
|
|
|
return taskslist; |
|
|
|
} |
|
|
|
} |
|
|
@ -245,6 +245,9 @@ public class TaskQueueZkImpl extends AbstractZKClient implements ITaskQueue { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private String getOriginTaskFormat(String formatTask){ |
|
|
|
private String getOriginTaskFormat(String formatTask){ |
|
|
|
String[] taskArray = formatTask.split(Constants.UNDERLINE); |
|
|
|
String[] taskArray = formatTask.split(Constants.UNDERLINE); |
|
|
|
|
|
|
|
if(taskArray.length< 4){ |
|
|
|
|
|
|
|
return formatTask; |
|
|
|
|
|
|
|
} |
|
|
|
int processInstanceId = Integer.parseInt(taskArray[1]); |
|
|
|
int processInstanceId = Integer.parseInt(taskArray[1]); |
|
|
|
int taskId = Integer.parseInt(taskArray[3]); |
|
|
|
int taskId = Integer.parseInt(taskArray[3]); |
|
|
|
|
|
|
|
|
|
|
|