打印日志

dev_forum
daiao 6 years ago
parent d991c52d10
commit 2eef513383

@ -707,10 +707,10 @@ class GamesController < ApplicationController
resubmit_identifier = @game.resubmit_identifier
# 如果没有超时并且正在评测中
# 判断评测中的状态有两种1、如果之前没有通关的只需判断status为1即可如果通过关则判断game的resubmit_identifier是否更新
# uid_logger("################game_status: #{@game.status}")
# uid_logger("################params[:resubmit]: #{params[:resubmit]}")
# uid_logger("################resubmit_identifier: #{resubmit_identifier}")
# uid_logger("################time_out: #{params[:time_out]}")
uid_logger("################game_status: #{@game.status}")
uid_logger("################params[:resubmit]: #{params[:resubmit]}")
uid_logger("################resubmit_identifier: #{resubmit_identifier}")
uid_logger("################time_out: #{params[:time_out]}")
if (params[:time_out] == "false") && ((params[:resubmit].blank? && @game.status == 1) || (params[:resubmit].present? &&
(params[:resubmit] != resubmit_identifier)))
# 代码评测的信息

@ -139,7 +139,6 @@ class MyshixunsController < ApplicationController
end
end
uid_logger("#############status: #{status}")
uid_logger("#############resubmit: #{resubmit}")
record = EvaluateRecord.where(:game_id => game_id).first
logger.info("training_task_status start#3**#{game_id}**** #{Time.now.strftime("%Y-%m-%d %H:%M:%S.%L")}")
answer_deduction_percentage = (100 - game.answer_deduction) / 100.to_f # 查看答案后剩余分数的百分比.
@ -147,6 +146,7 @@ class MyshixunsController < ApplicationController
# status0表示评测成功
if status == "0"
if resubmit.present?
uid_logger("#############resubmit: #{resubmit}")
game.update_attributes!(:retry_status => 2, :resubmit_identifier => resubmit)
challenge.path.split("").each do |path|
game_passed_code(path.try(:strip), myshixun, game_id)

Loading…
Cancel
Save