Skip to content

Commit

Permalink
Restore behavior when no conditions are specified
Browse files Browse the repository at this point in the history
  • Loading branch information
fbiville committed Mar 22, 2024
1 parent 2e0720d commit a31ad76
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions src/main/java/org/neo4j/dataflow/LocalRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,19 +132,23 @@ private static String executionId() {
}

private void waitUntilDone() {
Neo4jQueryCheck[] conditions = countQueryChecks.stream()
.map(check -> check.asRunnableCondition(neo4j))
.toList()
.toArray(new Neo4jQueryCheck[0]);
new PipelineOperator(launcher)
.waitForCondition(
Config.builder()
.setJobId(execution.jobId())
.setProject(project)
.setRegion(region)
.setTimeoutAfter(maxTimeout).setCheckAfter(checkInterval)
.build(),
conditions);
Config config = Config.builder()
.setJobId(execution.jobId())
.setProject(project)
.setRegion(region)
.setTimeoutAfter(maxTimeout).setCheckAfter(checkInterval)
.build();
PipelineOperator operator = new PipelineOperator(launcher);
if (countQueryChecks.isEmpty()) {
operator.waitUntilDone(config);
return;
}
operator.waitForCondition(
config,
countQueryChecks.stream()
.map(check -> check.asRunnableCondition(neo4j))
.toList()
.toArray(new Neo4jQueryCheck[0]));
}

private String gcsPath(String artifactId) {
Expand Down

0 comments on commit a31ad76

Please sign in to comment.