Skip to content

Commit f5e2733

Browse files
authored
Fix documentation on timeout (#513)
1 parent 8e9476e commit f5e2733

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/source/usage_patterns.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ unit_of_work
199199
from neo4j import unit_of_work
200200
201201
202-
@unit_of_work(timeout=10)
202+
@unit_of_work(timeout=10) # don't wait longer than 10 seconds for a result
203203
def test_work(tx, *args, **kwargs):
204204
query = "RETURN $tag AS $name"
205205

neo4j/work/simple.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def begin_transaction(self, metadata=None, timeout=None):
263263
:type metadata: dict
264264
265265
:param timeout:
266-
the transaction timeout in milliseconds.
266+
the transaction timeout in seconds.
267267
Transactions that execute longer than the configured timeout will be terminated by the database.
268268
This functionality allows to limit query/transaction execution time.
269269
Specified timeout overrides the default timeout configured in the database using ``dbms.transaction.timeout`` setting.
@@ -442,7 +442,7 @@ def count_people_tx(tx):
442442
:type metadata: dict
443443
444444
:param timeout:
445-
the transaction timeout in milliseconds.
445+
the transaction timeout in seconds.
446446
Transactions that execute longer than the configured timeout will be terminated by the database.
447447
This functionality allows to limit query/transaction execution time.
448448
Specified timeout overrides the default timeout configured in the database using ``dbms.transaction.timeout`` setting.

0 commit comments

Comments
 (0)