Skip to content

Commit

Permalink
Merge pull request #690 from BlitherBoom812/dev
Browse files Browse the repository at this point in the history
Dev: revise finish payload
  • Loading branch information
xiangmy21 authored May 7, 2024
2 parents fc40ed9 + 0bf1b68 commit 4200ad2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dependency/shell/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ if [ "$TERMINAL" = "SERVER" ]; then
finish_payload='{"status": "Finished", "scores": ['${score1}', '${score0}']}'
else
echo "Parse Failure: 1st team is Unknown"
finish_payload='{"result": {"status": "Crashed", "scores": [0, 0]}}'
finish_payload='{"status": "Crashed", "scores": [0, 0]}'
fi

if [[ -n $finish_payload ]]; then
Expand All @@ -143,7 +143,7 @@ if [ "$TERMINAL" = "SERVER" ]; then
touch temp.lock
mv -f temp.lock $playback_dir/playback.thuaipb
kill -9 $server_pid
finish_payload='{"result": {"status": "Crashed", "scores": [0, 0]}}'
finish_payload='{"status": "Crashed", "scores": [0, 0]}'
curl $FINISH_URL -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d "${finish_payload}" > $playback_dir/send.log 2>&1
fi

Expand Down

0 comments on commit 4200ad2

Please sign in to comment.