Merge branch 'dev_shixuns' into dev_hjm_build

dev_hjm_build
hjm 6 years ago
commit 9df95b3aa2

@ -570,13 +570,10 @@ class MyshixunsController < ApplicationController
:create_pod => timeCost['createPod'], :pod_execute => timeCost['execute'], :test_cases => test_cases_time,
:brige => timeCost['evaluateAllTime'], :return_back => return_back_time)
end
# 清空代码评测信息
msg = game.run_code_message
msg.update_column(:status => 0, :message => nil) if msg.present?
logger.info("training_task_status start#4**#{game_id}**** #{Time.now.strftime("%Y-%m-%d %H:%M:%S.%L")}")
render :json => {:data => "success"}
rescue Exception => e
render :json => {:data => "failed"}
render :json => {:data => "failed, errer_message:#{e}"}
logger.error("training_task_status error: #{e}")
raise ActiveRecord::Rollback
end

@ -498,7 +498,9 @@ class GamesService
# 更新评测次数
game.update_column(:evaluate_count, (game.evaluate_count.to_i + 1))
# 清空代码评测信息
msg = game.run_code_message
msg.update_column(:status => 0, :message => "") if msg.present?
# 更新时间是为了TPM端显示的更新退出实训及访问实训的时候会更新
myshixun.update_column(:updated_at, Time.now)

Loading…
Cancel
Save