|
|
|
@ -216,10 +216,11 @@ class MyshixunsController < ApplicationController
|
|
|
|
|
old_time = Time.now.to_i
|
|
|
|
|
begin
|
|
|
|
|
shixun_tomcat = edu_setting('tomcat_webssh')
|
|
|
|
|
tpiGitURL = "#{edu_setting('git_address_domain')}/#{@myshixun.repo_path}"
|
|
|
|
|
uri = "#{shixun_tomcat}/bridge/webssh/getConnectInfo"
|
|
|
|
|
# 由于中间层采用混合云的方式,因为local参数表示在有文件生成的实训是在本地生成,还是在其他云端生成评测文件
|
|
|
|
|
local = @myshixun.shixun.challenges.where.not(show_type: -1).count == 0
|
|
|
|
|
params = {tpiID:@myshixun.id, podType:@myshixun.shixun.try(:webssh), local: local,
|
|
|
|
|
params = {tpiID:@myshixun.id, podType:@myshixun.shixun.try(:webssh), local: local, tpiGitURL: tpiGitURL,
|
|
|
|
|
containers:(Base64.urlsafe_encode64(shixun_container_limit @myshixun.shixun))}
|
|
|
|
|
res = uri_post uri, params
|
|
|
|
|
if res && res['code'].to_i != 0
|
|
|
|
|