修改bug

This commit is contained in:
郑明仁 2019-09-26 10:48:01 +08:00
parent 957e3c42f7
commit 31f89548fe
2 changed files with 1 additions and 4 deletions

View File

@ -147,6 +147,7 @@ public class GameController {
String evaluateStartTime = requestTime.toString();
JSONObject cost = new JSONObject();
cost.put("evaluateStartTime", evaluateStartTime);
JedisUtil.set("timeCost:" + tpiID + ":" + buildID, cost.toJSONString());
Boolean reuseFlag = reusePod == null ? Boolean.FALSE : reusePod;
needPortMapping = needPortMapping == null ? 0 : needPortMapping;

View File

@ -436,7 +436,6 @@ public class GameService {
String createPodStatus = buildResultInJson.getString(BuildResultCsts.CREATE_POD_STATUS);
createPodStatus = createPodStatus == null ? BuildResultCsts.CREATE_POD_STATUS_SUCCESS: createPodStatus;
result.setCreatePodStatus(createPodStatus);
logger.debug("----------------1");
String resUsageStr = buildResultInJson.getString("resUsage");
ResUsage resUsage = this.buildResUsage(cases, resUsageStr);
// 如果编译输出太大截断
@ -485,7 +484,6 @@ public class GameService {
testCase.setTestSetMem(resUsage.getTestSetUsages().get(i).getTestSetMem());
msg.add(testCase);
}
logger.debug("----------------2");
// 假如运行结果不匹配封装出错误信息
StringBuffer errorInfo = new StringBuffer();
if ("-1".equals(result.getStatus()) && "compile successfully".equals(Base64Util.decode(compileResult))) {
@ -511,7 +509,6 @@ public class GameService {
if (StringUtils.isNotBlank(timeCost.getString("execute"))) {
executeCost = Double.parseDouble(timeCost.getString("execute"));
}
logger.debug("----------------3");
// 各阶段时间消耗将在此方法中传到前台没必要再存储到Jedis
timeCost.put("execute", String.format("%.3f", executeCost + encapsulateCost));
// 评测结束回传开始
@ -534,7 +531,6 @@ public class GameService {
tpiRepoPath = educoderRepoPath(tpiRepoPath);
map.put("tpiRepoPath", tpiRepoPath);
// 若生成了文件
logger.debug("----------------4");
if (buildParams.containsKey("file")) {
if ("apk".equals(JSONObject.parseObject(buildParams.getString("file")).getString("type"))) {
tpiRepoPath += "/" + JSONObject.parseObject(buildParams.getString("file")).getString("path");