Merge branches 'dev_aliyun' and 'dev_item_bank' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_item_bank

dev_daiao
杨树明 5 years ago
commit d3645fdded

@ -962,8 +962,11 @@ class GamesController < ApplicationController
shixun = game.myshixun.shixun
shixun_tomcat = edu_setting('cloud_bridge')
service_host = edu_setting('vnc_url')
tpiGitURL = "#{edu_setting('git_address_domain')}/#{game.myshixun.repo_path}"
uri = "#{shixun_tomcat}/bridge/vnc/getvnc"
params = {tpiID: game.myshixun.id, :containers => "#{Base64.urlsafe_encode64(shixun_container_limit(shixun))}"}
params = {tpiID: game.myshixun.id, :containers => "#{Base64.urlsafe_encode64(shixun_container_limit(shixun))}",
tpiGitURL: tpiGitURL}
res = uri_post uri, params
if res && res['code'].to_i != 0
raise("实训云平台繁忙繁忙等级99")

@ -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

@ -27,6 +27,7 @@ namespace :zip_pack do
pdfs << pdf
begin
zip.add(export.filename, pdf.path)
puts "out: #{export.filename}"
rescue => ex
Rails.logger.error(ex.message)

Loading…
Cancel
Save