diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e6475708..36616ced 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -269,6 +269,7 @@ module ApplicationHelper end def shixun_container_limit shixun + container = [] shixun.shixun_service_configs.each do |config| mirror = config.mirror_repository if mirror.name.present? @@ -281,7 +282,7 @@ module ApplicationHelper :type => mirror.try(:main_type) == "1" ? "main" : "sub"} end end - logger.info("########----- container: #{container}") + return container.to_json end # 实训作品列表的提交状态 diff --git a/app/services/games_service.rb b/app/services/games_service.rb index 8589023a..d9277529 100644 --- a/app/services/games_service.rb +++ b/app/services/games_service.rb @@ -532,6 +532,8 @@ class GamesService 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) + logger.info("#########container: #{shixun_container_limit(shixun)}") + # 更新评测次数 game.update_column(:evaluate_count, (game.evaluate_count.to_i + 1)) # 清空代码评测信息