Reputation: 140
I tried to use something like g.with_('evaluationTimeout', 1)
but it does not seem to work
Upvotes: 0
Views: 1277
Reputation: 14371
Assuming you are using one of the Gremlin GLV clients, then a query such as this one (Python in this case) will apply the per query timeout. Note that the longer form scriptEvaluationTimeout
was deprecated in favor of the shorter form evaluationTimeout
g.with_('scriptEvaluationTimeout',5).V().count().next()
or
g.with_('evaluationTimeout',5).V().count().next()
If the query times out, you will get an exception that includes as message such as:
gremlin_python.driver.protocol.GremlinServerError: 500:
{"detailedMessage":"A timeout occurred within the script during evaluation.","code":"TimeLimitExceededException","requestId":"9ec1e462-f47f-4876-8157-c0bf3c06ec6b"}
Upvotes: 2