-
-
Save juanmardefago/84d4b792e1dcd4b0c92f23df1c3e5731 to your computer and use it in GitHub Desktop.
Cost model batch deployment tool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OLDIFS=$IFS | |
IFS=',' | |
[ -z $1 ] && { echo "CSV file with subgraph hashes not supplied"; exit 99; } | |
[ -z $2 ] && { echo "Cost model file not supplied"; exit 99; } | |
[ ! -f $1 ] && { echo "$1 file not found"; exit 99; } | |
[ ! -f $2 ] && { echo "$2 file not found"; exit 99; } | |
while read subgraphId | |
do | |
echo "subgraph id detected: $subgraphId" | |
graph indexer cost set model $subgraphId $2 | |
echo "cost model $2 set for subgraph $subgraphId" | |
done < $1 | |
IFS=$OLDIFS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment