diff --git a/app/services/games_service.rb b/app/services/games_service.rb index 7cfe9107..ece6de68 100644 --- a/app/services/games_service.rb +++ b/app/services/games_service.rb @@ -530,7 +530,7 @@ class GamesService game = Game.select([:myshixun_id, :status, :challenge_id, :id, :evaluate_count]).find_by_identifier(params[:identifier]) myshixun = Myshixun.select([:updated_at, :gpid, :id, :shixun_id]).find(game.myshixun_id) shixun = Shixun.select([:id, :evaluate_script, :webssh, :exec_time, :sigle_training, :identifier, :status]).find(myshixun.shixun_id) - game_challenge = Challenge.select([:id, :position, :picture_path]).find(game.challenge_id) + game_challenge = Challenge.select([:id, :position, :picture_path, :exec_time]).find(game.challenge_id) # 更新评测次数 game.update_column(:evaluate_count, (game.evaluate_count.to_i + 1)) @@ -573,7 +573,7 @@ class GamesService params = {:tpiID => "#{myshixun.id}", :tpiGitURL => "#{gitUrl}", :buildID => "#{taskId}",:instanceChallenge => "#{step}", :testCases => "#{testCases}", :resubmit => "#{resubmit}", :times => params[:first].to_i, :podType => shixun.webssh, :containers => "#{Base64.urlsafe_encode64(shixun_container_limit(shixun))}", :tpmScript => "#{tpmScript}", - :timeLimit => "#{shixun.exec_time}", :content_modified => content_modified, :persistenceName => shixun.identifier, + :timeLimit => "#{game_challenge.exec_time}", :content_modified => content_modified, :persistenceName => shixun.identifier, :isPublished => (shixun.status < 2 ? 0 : 1), :sec_key => params[:sec_key]} # 评测有文件输出的需要特殊传字段 path:表示文件存储的位置