修复循环次数可能不对的BUG

This commit is contained in:
mxd 2019-11-01 10:24:52 +08:00
parent af159a264f
commit 1a6b97a65a
2 changed files with 75 additions and 75 deletions

View File

@ -167,7 +167,7 @@ public class Spider {
if(executor instanceof LoopExecutor){
variables.put(LoopExecutor.BEFORE_LOOP_VARIABLE, variables);
variables.put(LoopExecutor.LOOP_NODE_KEY + node.getNodeId(), new CountDownLatch(loopCount));
variables.put(LoopJoinExecutor.VARIABLE_CONTEXT + node.getNodeId(), new LinkedBlockingQueue<>(loopCount));
variables.put(LoopJoinExecutor.VARIABLE_CONTEXT + node.getNodeId(), new LinkedBlockingQueue<>());
}
for (int i = 0; i < loopCount; i++) {
if (context.isRunning()) {

View File

@ -64,8 +64,8 @@ public class LoopJoinExecutor implements ShapeExecutor {
beforeLoopVariable.forEach((k,v)->{
variables.remove("@" + k);
});
return isDone;
}
return isDone;
} else {
context.error("找不到等待节点:{}" + node.getStringJsonValue(JOIN_NODE_ID));
}