Skip to content

Commit

Permalink
Added break option
Browse files Browse the repository at this point in the history
  • Loading branch information
StrahinjaJacimovic committed Jul 31, 2024
1 parent dc04286 commit 6e16d0a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ def remove_duplicate_indexed_files(es : Elasticsearch, index_name):
while num_of_retries <= 10:
try:
response = es.search(index=index_name, body=query_search)
if not response['timed_out']:
break
except:
print("Executing search query - retry number %i" % num_of_retries)
num_of_retries += 1
Expand Down

0 comments on commit 6e16d0a

Please sign in to comment.