Skip to content

Commit

Permalink
Tweak blockchain job name
Browse files Browse the repository at this point in the history
  • Loading branch information
platfowner committed Aug 27, 2024
1 parent eaccf3d commit b47f094
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions start_node_genesis_onprem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ fi

printf '\n'
printf 'Killing old jobs..\n'
sudo killall 'client/ain-blockchain-${SEASON}-index.js'
sudo killall "client/${SEASON}-ain-blockchain-index.js"
if [[ $KEEP_CODE_OPTION = "--no-keep-code" ]]; then
printf '\n'
printf 'Setting up new working directory..\n'
sudo rm -rf /home/${SEASON}-ain-blockchain*
# NOTE(platfowner): Add $SEASON to the node job name to be selectively killed in restarts.
CODE_CMD="cd ~; sudo mv ${SEASON}-ain-blockchain /home; sudo chmod -R 777 /home/${SEASON}-ain-blockchain; sudo chown -R $GCP_USER:$GCP_USER /home/${SEASON}-ain-blockchain; cd /home/${SEASON}-ain-blockchain; mv client/index.js client/ain-blockchain-${SEASON}-index.js"
CODE_CMD="cd ~; sudo mv ${SEASON}-ain-blockchain /home; sudo chmod -R 777 /home/${SEASON}-ain-blockchain; sudo chown -R $GCP_USER:$GCP_USER /home/${SEASON}-ain-blockchain; cd /home/${SEASON}-ain-blockchain; mv client/index.js client/${SEASON}-ain-blockchain-index.js"
printf "\nCODE_CMD=$CODE_CMD\n"
eval $CODE_CMD
else
Expand Down Expand Up @@ -339,7 +339,7 @@ else
fi

printf "\nStarting up Blockchain Node server..\n\n"
START_CMD="nohup node --async-stack-traces --max-old-space-size=$MAX_OLD_SPACE_SIZE_MB client/ain-blockchain-${SEASON}-index.js >/dev/null 2>error_logs.txt &"
START_CMD="nohup node --async-stack-traces --max-old-space-size=$MAX_OLD_SPACE_SIZE_MB client/${SEASON}-ain-blockchain-index.js >/dev/null 2>error_logs.txt &"
printf "\nSTART_CMD=$START_CMD\n"
printf "START_CMD=$START_CMD\n" >> start_commands.txt
eval $START_CMD
Expand Down

0 comments on commit b47f094

Please sign in to comment.