diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 9fd7dc0b5..5eca6ccf9 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -319,6 +319,7 @@ class ApplicationController < ActionController::Base # 通关后,把最后一次成功的代码存到数据库 # type 0 创始内容, 1 最新内容 def game_passed_code(path, myshixun, game_id) + # 如果代码窗口是隐藏的,则不用保存代码 return if myshixun.shixun.hide_code file_content = git_fle_content myshixun.repo_path, path unless file_content.present? diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 112b3352a..e1d6fe0cb 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -94,6 +94,7 @@ class MyshixunsController < ApplicationController ActiveRecord::Base.transaction do begin t1 = Time.now + Rails.logger.info("@@@222222#{params[:jsonTestDetails]}") jsonTestDetails = JSON.parse(params[:jsonTestDetails]) timeCost = JSON.parse(params[:timeCost]) brige_end_time = Time.parse(timeCost['evaluateEnd']) if timeCost['evaluateEnd'].present? @@ -130,8 +131,8 @@ class MyshixunsController < ApplicationController # is_public = test_sets.where(:position => j_test_set['caseId']).first.try(:is_public) logger.info "actual_output:################################################# #{actual_output}" - ts_time = format("%.2f", j_test_set['testSetTime'].to_f/1000000000).to_f - ts_mem = format("%.2f", j_test_set['testSetMem'].to_f/1024/1024).to_f + ts_time = format("%.2f", j_test_set['testSetTime'].to_f/1000000000).to_f if j_test_set['testSetTime'] + ts_mem = format("%.2f", j_test_set['testSetMem'].to_f/1024/1024).to_f if j_test_set['testSetMem'] Output.create!(:code => status, :game_id => game_id, :out_put => outPut, :test_set_position => j_test_set['caseId'], :actual_output => actual_output, :result => j_test_set['passed'].to_i, :query_index => max_query_index, @@ -210,10 +211,10 @@ class MyshixunsController < ApplicationController end uid_logger("training_task_status start#4**#{game_id}**** #{Time.now.strftime("%Y-%m-%d %H:%M:%S.%L")}") sucess_status - rescue Exception => e - tip_exception(e.message) - uid_logger_error("training_task_status error: #{e}") - raise ActiveRecord::Rollback + # rescue Exception => e + # tip_exception(e.message) + # uid_logger_error("training_task_status error: #{e}") + # raise ActiveRecord::Rollback end end end diff --git a/public/react/src/modules/user/Interestpage.js b/public/react/src/modules/user/Interestpage.js index 4c3c39406..b3abfe1a4 100644 --- a/public/react/src/modules/user/Interestpage.js +++ b/public/react/src/modules/user/Interestpage.js @@ -258,15 +258,15 @@ class InterestpageComponent extends Component {
选择你可能感兴趣的内容
diff --git a/public/react/src/modules/user/InterestpageMax.js b/public/react/src/modules/user/InterestpageMax.js index 82b3e7e0f..a53c1bbe0 100644 --- a/public/react/src/modules/user/InterestpageMax.js +++ b/public/react/src/modules/user/InterestpageMax.js @@ -260,15 +260,15 @@ class InterestpageMax extends Component {