mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-11-04 14:49:58 +08:00
实现在动态获取语言编译命令
This commit is contained in:
parent
b9cf57947b
commit
cc43dc7e90
18
judge/ide.py
18
judge/ide.py
@ -10,7 +10,6 @@ from conf.models import JudgeServer
|
||||
from options.options import SysOptions
|
||||
from utils.cache import cache
|
||||
from utils.constants import CacheKey
|
||||
from judge.languages import _c_lang_config, _c_o2_lang_config, _cpp_lang_config, _cpp_o2_lang_config, _java_lang_config, _py2_lang_config, _py3_lang_config
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@ -61,23 +60,6 @@ class IDEDispatcher(object):
|
||||
def judge(self):
|
||||
if not self.test_case:
|
||||
raise ValueError("invalid parameter")
|
||||
|
||||
'''
|
||||
if self.language == "C":
|
||||
language_config = _c_lang_config
|
||||
if self.language == "C With O2":
|
||||
language_config = _c_o2_lang_config
|
||||
if self.language == "C++":
|
||||
language_config = _cpp_lang_config
|
||||
if self.language == "C++ With O2":
|
||||
language_config = _cpp_o2_lang_config
|
||||
if self.language == "Java":
|
||||
language_config = _java_lang_config
|
||||
if self.language == "Python2":
|
||||
language_config = _py2_lang_config
|
||||
if self.language == "Python3":
|
||||
language_config = _py3_lang_config
|
||||
'''
|
||||
|
||||
sub_config = list(filter(lambda item: self.language == item["name"], SysOptions.languages))[0]
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user