Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mfshao committed Aug 7, 2024
1 parent 7f5ca9d commit 547e383
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions sidecar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,24 @@ populate_notebook() {
}

function populate() {
log "querying manifest service at $GEN3_ENDPOINT/manifests/"
MANIFEST_FILE=$(curl -s -H "Authorization: Bearer ${ACCESS_TOKEN}" "https://$GEN3_ENDPOINT/manifests/")
log "querying manifest service at $GEN3_ENDPOINT/manifests/metadata/"
METADATA_FILE=$(curl -s -H "Authorization: Bearer ${ACCESS_TOKEN}" "https://$GEN3_ENDPOINT/manifests/metadata/")
log "querying manifest service at $GEN3_ENDPOINT/manifests"
MANIFEST_FILE=$(curl -s -H "Authorization: Bearer ${ACCESS_TOKEN}" "https://$GEN3_ENDPOINT/manifests")
log "querying manifest service at $GEN3_ENDPOINT/manifests/metadata"
METADATA_FILE=$(curl -s -H "Authorization: Bearer ${ACCESS_TOKEN}" "https://$GEN3_ENDPOINT/manifests/metadata")

while [ -z "$MANIFEST_FILE" ] && [ -z "$METADATA_FILE" ]; do
if [ -z "$MANIFEST_FILE" ]; then
log "Unable to get manifests from '$GEN3_ENDPOINT/manifests/'"
log "Unable to get manifests from '$GEN3_ENDPOINT/manifests'"
log $MANIFEST_FILE
fi
if [ -z "$METADATA_FILE" ]; then
log "Unable to get metadata from '$GEN3_ENDPOINT/manifests/metadata/'"
log "Unable to get metadata from '$GEN3_ENDPOINT/manifests/metadata'"
log $METADATA_FILE
fi
log "sleeping for 15 seconds before trying again.."
sleep 15
MANIFEST_FILE=$(curl -s -H "Authorization: Bearer ${ACCESS_TOKEN}" "https://$GEN3_ENDPOINT/manifests/")
METADATA_FILE=$(curl -s -H "Authorization: Bearer ${ACCESS_TOKEN}" "https://$GEN3_ENDPOINT/manifests/metadata/")
MANIFEST_FILE=$(curl -s -H "Authorization: Bearer ${ACCESS_TOKEN}" "https://$GEN3_ENDPOINT/manifests")
METADATA_FILE=$(curl -s -H "Authorization: Bearer ${ACCESS_TOKEN}" "https://$GEN3_ENDPOINT/manifests/metadata")
done
log "successfully retrieved manifests and metadata for user"

Expand Down

0 comments on commit 547e383

Please sign in to comment.