Skip to content

Commit 35ae1ff

Browse files
author
DvirDukhan
committed
cosmetics
1 parent 58a3f34 commit 35ae1ff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

redisgraph_bulk_loader/bulk_insert.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import sys
3+
import asyncio
34
import aioredis
45
import asyncclick as click
56
from timeit import default_timer as timer
@@ -70,7 +71,7 @@ async def process_entities(entities):
7071
@click.option('--max-token-size', '-t', default=500, help='max size of each token in megabytes (default 500, max 512)')
7172
@click.option('--index', '-i', multiple=True, help='Label:Propery on which to create an index')
7273
@click.option('--full-text-index', '-f', multiple=True, help='Label:Propery on which to create an full text search index')
73-
@click.option('--async-requests', '-A', default=3, help='number of async requests to be executed in parallel' )
74+
@click.option('--async-requests', '-j', default=3, help='number of async requests to be executed in parallel')
7475
async def bulk_insert(graph, host, port, password, user, unix_socket_path, nodes, nodes_with_label, relations, relations_with_type, separator, enforce_schema, skip_invalid_nodes, skip_invalid_edges, escapechar, quote, max_token_count, max_buffer_size, max_token_size, index, full_text_index, async_requests):
7576
if sys.version_info.major < 3 or sys.version_info.minor < 8:
7677
raise Exception("Python >= 3.8 is required for the RedisGraph bulk loader.")
@@ -156,4 +157,4 @@ async def bulk_insert(graph, host, port, password, user, unix_socket_path, nodes
156157

157158

158159
if __name__ == '__main__':
159-
bulk_insert()
160+
asyncio.run(bulk_insert())

0 commit comments

Comments
 (0)