JudgeServer/server/run.sh
2016-10-29 16:02:44 +08:00

7 lines
280 B
Bash

#!/usr/bin/env bash
chown compiler:compiler /spj
echo 0 > /tmp/counter
core=$(grep --count ^processor /proc/cpuinfo)
n=$(($core*4))
chmod 400 /token.txt /tmp/counter
gunicorn --workers $n --threads $n --error-logfile /log/gunicorn.log --time 600 --bind 0.0.0.0:8080 server:wsgiapp