Skip to content

Commit

Permalink
PR updates
Browse files Browse the repository at this point in the history
  • Loading branch information
gem-neo4j committed Jan 8, 2025
1 parent 15b97bc commit cce109a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions core/src/main/java/apoc/cypher/Timeboxed.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public Stream<CypherStatementMapResult> runTimeboxed(
@Name(value = "statement", description = "The Cypher statement to run.") String cypher,
@Name(value = "params", description = "The parameters for the given Cypher statement.")
Map<String, Object> params,
@Name(value = "timeout", description = "The maximum time the statement can run for.") long timeout,
@Name(value = "timeout", description = "The maximum time, in milliseconds, the statement can run for.") long timeout,
@Name(
value = "config",
defaultValue = "{}",
Expand All @@ -83,11 +83,6 @@ public Stream<CypherStatementMapResult> runTimeboxed(
boolean failOnError = toBoolean(config.get("failOnError"));
boolean appendStatusRow = toBoolean(config.get("appendStatusRow"));

// Check the query is valid before trying to run it
if (failOnError) {
Util.validateQuery(db, cypher);
}

// run query to be timeboxed in a separate thread to enable proper tx termination
// if we'd run this in current thread, a tx.terminate would kill the transaction the procedure call uses itself.
pools.getDefaultExecutorService().submit(() -> {
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/resources/procedures/common/procedures.json
Original file line number Diff line number Diff line change
Expand Up @@ -1794,7 +1794,7 @@
"type" : "MAP"
}, {
"name" : "timeout",
"description" : "The maximum time the statement can run for.",
"description" : "The maximum time, in milliseconds, the statement can run for.",
"isDeprecated" : false,
"type" : "INTEGER"
},
Expand Down

0 comments on commit cce109a

Please sign in to comment.