|
|
|
@ -74,6 +74,7 @@ class GamesController < ApplicationController
|
|
|
|
|
#@vnc_url = "http://#{service_host}:#{res['port']}/vnc_lite.html?password=headless"
|
|
|
|
|
# 有域名版本
|
|
|
|
|
@vnc_url = "https://#{res['port']}.#{service_host}/vnc_lite.html?password=headless"
|
|
|
|
|
@vnc_evaluate = @shixun.vnc_evaluate
|
|
|
|
|
rescue Exception => e
|
|
|
|
|
Rails.logger.error(e.message)
|
|
|
|
|
end
|
|
|
|
@ -535,13 +536,14 @@ class GamesController < ApplicationController
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
testCases = Base64.urlsafe_encode64(testSet.to_json) unless testSet.blank?
|
|
|
|
|
|
|
|
|
|
# 评测类型: 0,1,2 用于webssh的评测, 3用于vnc
|
|
|
|
|
podType = @shixun.vnc_evaluate ? 3 : @shixun.webssh
|
|
|
|
|
|
|
|
|
|
# 注意:这个地方的参数写的时候不能换行
|
|
|
|
|
content_modified = params[:content_modified] # 决定文件内容是否有修改,有修改如果中间层pull没有更新,则轮询等待更新
|
|
|
|
|
br_params = {:tpiID => "#{@myshixun.id}", :tpiGitURL => "#{gitUrl}", :buildID => "#{@game.id}",
|
|
|
|
|
:instanceChallenge => "#{step}", :testCases => "#{testCases}", :resubmit => "#{resubmit}",
|
|
|
|
|
:times => params[:first].to_i, :podType => @shixun.webssh, :content_modified => content_modified,
|
|
|
|
|
:times => params[:first].to_i, :podType => podType, :content_modified => content_modified,
|
|
|
|
|
:containers => "#{Base64.urlsafe_encode64(shixun_container_limit(@shixun))}",
|
|
|
|
|
:persistenceName => @shixun.identifier, :tpmScript => "#{tpmScript}", :sec_key => sec_key,
|
|
|
|
|
:timeLimit => game_challenge.exec_time, :isPublished => (@shixun.status < 2 ? 0 : 1) }
|
|
|
|
|