gremlin how to set scriptevaluationtimeout 0

2.4k Views Asked by At

I want to set scriptevaluationtimeout 0.
I'm using apache-tinkerpop-gremlin-console-3.4.9.
and I want to use gremlin-python.

1

There are 1 best solutions below

7
On

As the question above noted, it's not quite clear whether you mean Gremlin Console or gremlin-python so I will just answer both ways. For Gremlin Console, the preferred method for remote connections is to issue this command:

gremlin> :remote connect tinkerpop.server conf/remote.yaml 
==>Configured localhost/127.0.0.1:8182
gremlin> :remote config timeout none

The above is detailed in this section of the Reference Documentation. For gremlin-python you can configure per request timeouts as described here for scripts:

result_set = client.submit('g.V().repeat(both()).times(100)', result_options={'evaluationTimeout': 0})

or here for bytecode:

vertices = g.with_('evaluationTimeout', 0).V().out('knows').toList()