From 070eea318d436934b062ac085ef05e3cd67d15e3 Mon Sep 17 00:00:00 2001 From: Changli Tang <84725343+TCL606@users.noreply.github.com> Date: Wed, 17 May 2023 15:50:53 +0800 Subject: [PATCH] chore: only send result in server --- dependency/shell/run.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dependency/shell/run.sh b/dependency/shell/run.sh index 82b9833..3657e62 100644 --- a/dependency/shell/run.sh +++ b/dependency/shell/run.sh @@ -53,10 +53,10 @@ if [ -f $playback_dir/start.lock ]; then sleep 1 ps -p $server_pid > /dev/null 2>&1 done - result=$(cat /usr/local/playback/result.json) - score0=$(echo "$result" | grep -oP '(?<="Student":)\d+') - score1=$(echo "$result" | grep -oP '(?<="Tricker":)\d+') - curl $URL -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"result":[{"team_id":0, "score":'${score0}'}, {"team_id":1, "score":'${score1}'}], "mode":'${MODE}'}'> $playback_dir/send.log 2>&1 + # result=$(cat /usr/local/playback/result.json) + # score0=$(echo "$result" | grep -oP '(?<="Student":)\d+') + # score1=$(echo "$result" | grep -oP '(?<="Tricker":)\d+') + # curl $URL -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"result":[{"team_id":0, "score":'${score0}'}, {"team_id":1, "score":'${score1}'}], "mode":'${MODE}'}'> $playback_dir/send.log 2>&1 touch $playback_dir/finish.lock echo "Finish" else