删除 judger_controller 的日志配置
This commit is contained in:
@@ -1,9 +0,0 @@
|
|||||||
# coding=utf-8
|
|
||||||
import logging
|
|
||||||
|
|
||||||
# 此处的 celery 代码如果在 docker 中运行,需要将filename 修改为映射路径
|
|
||||||
logging.basicConfig(level=logging.DEBUG,
|
|
||||||
format='%(asctime)s [%(threadName)s:%(thread)d] [%(name)s:%(lineno)d] [%(module)s:%(funcName)s] [%(levelname)s]- %(message)s',
|
|
||||||
filename='/var/log/judge.log')
|
|
||||||
|
|
||||||
logger = logging
|
|
||||||
@@ -5,7 +5,6 @@ import MySQLdb
|
|||||||
import subprocess
|
import subprocess
|
||||||
from ..judger.result import result
|
from ..judger.result import result
|
||||||
from ..judger_controller.celery import app
|
from ..judger_controller.celery import app
|
||||||
from logger import logger
|
|
||||||
from settings import docker_config, source_code_dir, test_case_dir, log_dir, submission_db, redis_config
|
from settings import docker_config, source_code_dir, test_case_dir, log_dir, submission_db, redis_config
|
||||||
|
|
||||||
|
|
||||||
@@ -27,7 +26,6 @@ def judge(submission_id, time_limit, memory_limit, test_case_id):
|
|||||||
submission_id, str(time_limit), str(memory_limit), test_case_id)
|
submission_id, str(time_limit), str(memory_limit), test_case_id)
|
||||||
subprocess.call(command, shell=docker_config["shell"])
|
subprocess.call(command, shell=docker_config["shell"])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(e)
|
|
||||||
conn = MySQLdb.connect(db=submission_db["db"],
|
conn = MySQLdb.connect(db=submission_db["db"],
|
||||||
user=submission_db["user"],
|
user=submission_db["user"],
|
||||||
passwd=submission_db["password"],
|
passwd=submission_db["password"],
|
||||||
|
|||||||
Reference in New Issue
Block a user