Skip to content

Commit

Permalink
Update check_indexes.py
Browse files Browse the repository at this point in the history
  • Loading branch information
StrahinjaJacimovic authored Dec 24, 2024
1 parent 14d64a4 commit ddd25d9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/check_indexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ def str2bool(v):

err = False
for indexed_item in es_instance.indexed_items:
if indexed_item['name'] != 'database':
continue
asset_status = requests.get(indexed_item['source']['download_link'], headers=headers)
indexed_item['source']['version'] = '1.1.180'
es_instance.update(None, indexed_item['doc']['id'], indexed_item['source'])
break
if es_instance.Status.ERROR.value == asset_status.status_code: ## code 404 - error, reindex with correct download link
err = True
print("%sERROR: Asset \"%s\" download link is incorrect. - %s" % (es_instance.Colors.FAIL, indexed_item['source']['name'], indexed_item['source']['download_link']))
Expand Down

0 comments on commit ddd25d9

Please sign in to comment.