Skip to content

Commit a7776d5

Browse files
authored
fix: set write_async to False by default (#77)
* fix: set `write_async` to False by default * fix: lint
1 parent 48b4bfe commit a7776d5

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

nx_arangodb/classes/digraph.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class DiGraph(Graph, nx.DiGraph):
109109
Used for inserting node and edge data into the database if and only if
110110
**incoming_graph_data** is a NetworkX graph.
111111
112-
write_async : bool (optional, default: True)
112+
write_async : bool (optional, default: False)
113113
Whether to insert data into ArangoDB asynchronously. Used for inserting
114114
node and edge data into the database if and only if **incoming_graph_data**
115115
is a NetworkX graph.
@@ -157,7 +157,7 @@ def __init__(
157157
read_parallelism: int = 10,
158158
read_batch_size: int = 100000,
159159
write_batch_size: int = 50000,
160-
write_async: bool = True,
160+
write_async: bool = False,
161161
symmetrize_edges: bool = False,
162162
use_arango_views: bool = False,
163163
overwrite_graph: bool = False,

nx_arangodb/classes/function.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ def separate_nodes_by_collections(
801801

802802

803803
def transform_local_documents_for_adb(
804-
original_documents: dict[str, Any]
804+
original_documents: dict[str, Any],
805805
) -> list[dict[str, Any]]:
806806
"""Transform original documents into a format suitable for UPSERT
807807
operations in ArangoDB. Returns a list of documents with '_key' attribute

nx_arangodb/classes/graph.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class Graph(nx.Graph):
143143
Used for inserting node and edge data into the database if and only if
144144
**incoming_graph_data** is a NetworkX graph.
145145
146-
write_async : bool (optional, default: True)
146+
write_async : bool (optional, default: False)
147147
Whether to insert data into ArangoDB asynchronously. Used for inserting
148148
node and edge data into the database if and only if **incoming_graph_data**
149149
is a NetworkX graph.
@@ -191,7 +191,7 @@ def __init__(
191191
read_parallelism: int = 10,
192192
read_batch_size: int = 100000,
193193
write_batch_size: int = 50000,
194-
write_async: bool = True,
194+
write_async: bool = False,
195195
symmetrize_edges: bool = False,
196196
use_arango_views: bool = False,
197197
overwrite_graph: bool = False,

nx_arangodb/classes/multidigraph.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class MultiDiGraph(MultiGraph, DiGraph, nx.MultiDiGraph):
119119
Used for inserting node and edge data into the database if and only if
120120
**incoming_graph_data** is a NetworkX graph.
121121
122-
write_async : bool (optional, default: True)
122+
write_async : bool (optional, default: False)
123123
Whether to insert data into ArangoDB asynchronously. Used for inserting
124124
node and edge data into the database if and only if **incoming_graph_data**
125125
is a NetworkX graph.
@@ -168,7 +168,7 @@ def __init__(
168168
read_parallelism: int = 10,
169169
read_batch_size: int = 100000,
170170
write_batch_size: int = 50000,
171-
write_async: bool = True,
171+
write_async: bool = False,
172172
symmetrize_edges: bool = False,
173173
use_arango_views: bool = False,
174174
overwrite_graph: bool = False,

nx_arangodb/classes/multigraph.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class MultiGraph(Graph, nx.MultiGraph):
120120
Used for inserting node and edge data into the database if and only if
121121
**incoming_graph_data** is a NetworkX graph.
122122
123-
write_async : bool (optional, default: True)
123+
write_async : bool (optional, default: False)
124124
Whether to insert data into ArangoDB asynchronously. Used for inserting
125125
node and edge data into the database if and only if **incoming_graph_data**
126126
is a NetworkX graph.
@@ -169,7 +169,7 @@ def __init__(
169169
read_parallelism: int = 10,
170170
read_batch_size: int = 100000,
171171
write_batch_size: int = 50000,
172-
write_async: bool = True,
172+
write_async: bool = False,
173173
symmetrize_edges: bool = False,
174174
use_arango_views: bool = False,
175175
overwrite_graph: bool = False,

0 commit comments

Comments
 (0)