Skip to content

Commit

Permalink
Updated index checks
Browse files Browse the repository at this point in the history
  • Loading branch information
StrahinjaJacimovic committed Nov 1, 2024
1 parent d92937d commit 93327aa
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 @@ -3,6 +3,9 @@
import classes.class_gh as gh
import classes.class_es as es

# Skip packages with these types
type_skip = ['microchip_dfp', 'microchip_tp']

if __name__ == "__main__":
# First, check for arguments passed
def str2bool(v):
Expand Down Expand Up @@ -43,6 +46,8 @@ def str2bool(v):

err = False
for indexed_item in es_instance.indexed_items:
if indexed_item['source']['type'] in type_skip:
continue
asset_status = requests.get(indexed_item['source']['download_link'], headers=headers)
if es_instance.Status.ERROR.value == asset_status.status_code: ## code 404 - error, reindex with correct download link
err = True
Expand Down

0 comments on commit 93327aa

Please sign in to comment.