From 8aa7d7bd725d9e8ca7f042076ac0d3c745db4ca4 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 6 Jan 2020 17:10:42 +0800 Subject: [PATCH 1/2] =?UTF-8?q?vnc=20webssh=E5=A4=9A=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/games_controller.rb | 5 ++++- app/controllers/myshixuns_controller.rb | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 938d42c2f..055c656eb 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -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)") diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 67bec877b..7847d58ed 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -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 From 260c2c2ad93f441108ebe62d0c52fc1973788f0c Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 6 Jan 2020 17:11:33 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/zip_pack.rake | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tasks/zip_pack.rake b/lib/tasks/zip_pack.rake index 54099a2c0..6e3140f47 100644 --- a/lib/tasks/zip_pack.rake +++ b/lib/tasks/zip_pack.rake @@ -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)