initial stage

This commit is contained in:
Giambattista Bloisi 2024-07-26 22:23:33 +02:00
parent 19bde3bcef
commit c6a12baeba
1 changed files with 9 additions and 9 deletions

View File

@ -145,15 +145,15 @@ def import_catalogue_entities():
yield {"_index": mapped_index, "_id": doc['id'], "_source": doc}
succeeded = 0
failed = 0
for success, item in helpers.parallel_bulk(client, actions=streamed_results(), timeout=5 * 60):
if success:
succeeded = succeeded + 1
else:
print("error: " + str(item))
failed = failed + 1
print(f"Entity: {entity} succes: {success} error: {failed}")
succeeded = 0
failed = 0
for success, item in helpers.parallel_bulk(client, actions=streamed_results(), timeout=5 * 60):
if success:
succeeded = succeeded + 1
else:
print("error: " + str(item))
failed = failed + 1
print(f"Entity: {entity} succes: {success} error: {failed}")
@task
def close_indexes(**kwargs):