Browse Source

Merge branch 'dev' of github.com:eesast/THUAI6 into dev

tags/0.1.0
TCL 2 years ago
parent
commit
4392cac991
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      dependency/shell/run.sh

+ 8
- 3
dependency/shell/run.sh View File

@@ -3,8 +3,13 @@
python_dir=/usr/local/PlayerCode/CAPI/python/PyAPI python_dir=/usr/local/PlayerCode/CAPI/python/PyAPI
playback_dir=/usr/local/playback playback_dir=/usr/local/playback


nice -10 ./Server --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600 --url $URL --token $TOKEN --fileName $playback_dir/video --startLockFile $playback_dir/start.lock > $playback_dir/server.log &
server_pid=$!
if [ $EXPOSED -eq 1 ]; then
nice -10 ./Server --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600 --url $URL --token $TOKEN --fileName $playback_dir/video --startLockFile $playback_dir/start.lock > $playback_dir/server.log &
server_pid=$!
else
nice -10 ./Server --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600 --notAllowSpectator --url $URL --token $TOKEN --fileName $playback_dir/video --startLockFile $playback_dir/start.lock > $playback_dir/server.log &
server_pid=$!
fi
sleep 5 sleep 5
for k in {1..2} for k in {1..2}
do do
@@ -60,4 +65,4 @@ fi
result=$(cat /usr/local/playback/result.json) result=$(cat /usr/local/playback/result.json)
score0=$(parse_json $result "Student") score0=$(parse_json $result "Student")
score1=$(parse_json $result "Tricker") score1=$(parse_json $result "Tricker")
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}'}'
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}'}'

Loading…
Cancel
Save