JudgeServer/server/config.py

25 lines
635 B
Python
Raw Permalink Normal View History

2016-09-02 12:04:29 +00:00
import os
import pwd
2018-03-18 00:19:44 +00:00
import grp
JUDGER_WORKSPACE_BASE = "/judger/run"
2016-09-28 11:55:39 +00:00
LOG_BASE = "/log"
2016-09-02 12:04:29 +00:00
2018-03-18 00:19:44 +00:00
COMPILER_LOG_PATH = os.path.join(LOG_BASE, "compile.log")
JUDGER_RUN_LOG_PATH = os.path.join(LOG_BASE, "judger.log")
SERVER_LOG_PATH = os.path.join(LOG_BASE, "judge_server.log")
2016-09-02 12:04:29 +00:00
2018-08-10 01:33:29 +00:00
RUN_USER_UID = pwd.getpwnam("code").pw_uid
RUN_GROUP_GID = grp.getgrnam("code").gr_gid
2016-10-15 19:38:45 +00:00
COMPILER_USER_UID = pwd.getpwnam("compiler").pw_uid
COMPILER_GROUP_GID = grp.getgrnam("compiler").gr_gid
2016-09-02 12:04:29 +00:00
2018-10-14 09:26:37 +00:00
SPJ_USER_UID = pwd.getpwnam("spj").pw_uid
SPJ_GROUP_GID = grp.getgrnam("spj").gr_gid
TEST_CASE_DIR = "/test_case"
SPJ_SRC_DIR = "/judger/spj"
SPJ_EXE_DIR = "/judger/spj"