mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-09-21 08:23:20 +00:00
修改 docker 运行时间配置
This commit is contained in:
parent
0aeeab3c8c
commit
2731bc9249
@ -14,7 +14,7 @@ def judge(solution_id, time_limit, memory_limit, test_case_id):
|
||||
"python judger/run.py "
|
||||
"--solution_id %s --time_limit %s --memory_limit %s --test_case_id %s" %
|
||||
(solution_id, str(time_limit), str(memory_limit), test_case_id),
|
||||
# 设置最长运行时间是3倍的 cpu 时间
|
||||
timeout=(time_limit / 1000.0 * 3), shell=True)
|
||||
# 设置最长运行时间是5倍的 cpu 时间
|
||||
timeout=(time_limit / 1000.0 * 5), shell=True)
|
||||
except subprocess.TimeoutExpired:
|
||||
print "docker timeout"
|
||||
|
Loading…
Reference in New Issue
Block a user