From 49ef49a32530bebebf96e28deb5f6d1f8eef0bbe Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sat, 13 Apr 2019 10:07:27 +0800 Subject: [PATCH] 1 --- app/controllers/myshixuns_controller.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 030f3f10..e0157b67 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -451,15 +451,12 @@ class MyshixunsController < ApplicationController # 只有评测中的game才会创建和更新代码评测中的信息 logger.info("##################game: #{game.status}") logger.info("##################retry_status: #{game.retry_status}") - if game.status == 1 || game.status == 2 && game.retry_status == 1 + if game.status == 1 || game.status == 2 if msg.blank? RunCodeMessage.create!(:game_id => game_id, :status => 1, :message => message) else msg.update_attributes(:status => (msg.status + 1), :message => message) end - else - # 评测完成,初始化评测信息的状态 - msg.update_attributes(:status => 0, :message => nil) if msg.present? end render :json => {:data => "success"} end