|
|
|
@ -45,7 +45,7 @@ class GamesService
|
|
|
|
|
|
|
|
|
|
# 高性能取上一关、下一关
|
|
|
|
|
prev_game = Game.prev_identifier(shixun.id, game.myshixun_id, game_challenge.position)
|
|
|
|
|
next_game = if current_user.is_certification_teacher || shixun_manager(shixun, current_user) || game.status || shixun.task_pass
|
|
|
|
|
next_game = if shixun.vnc || current_user.is_certification_teacher || shixun_manager(shixun, current_user) || game.status || shixun.task_pass
|
|
|
|
|
Game.next_game(shixun.id, game.myshixun_id, game_challenge.position).try(:identifier)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@ -87,11 +87,12 @@ class GamesService
|
|
|
|
|
if res && res['code'].to_i != 0
|
|
|
|
|
raise("实训云平台繁忙(繁忙等级:99)")
|
|
|
|
|
end
|
|
|
|
|
url = service_host +":#{res['port']}/vnc.html"
|
|
|
|
|
url = service_host +":#{res['port']}/vnc_lite.html"
|
|
|
|
|
container = container.merge(:vnc_url => url, :test => "666")
|
|
|
|
|
rescue Exception => e
|
|
|
|
|
Rails.logger.error(e.message)
|
|
|
|
|
end
|
|
|
|
|
container = container.merge(:vnc_url => url)
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|