From f5aa02a775f65e5110f2e024d9a279b539492657 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 31 Dec 2019 14:04:17 +0800 Subject: [PATCH] =?UTF-8?q?jupyter=20get=E6=97=B6=E4=BC=A0=E5=85=A5giturl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/jupyter_service.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/services/jupyter_service.rb b/app/services/jupyter_service.rb index 29f54cb02..66869d275 100644 --- a/app/services/jupyter_service.rb +++ b/app/services/jupyter_service.rb @@ -8,7 +8,7 @@ module JupyterService uri = "#{shixun_tomcat}/bridge/jupyter/get" tpiID = "tpm#{shixun.id}" mount = shixun.data_sets.present? - params = {tpiID: tpiID, identifier: shixun.identifier, needMount: mount, + params = {tpiID: tpiID, identifier: shixun.identifier, needMount: mount, gitUrl: '', :containers => "#{Base64.urlsafe_encode64(shixun_container_limit(shixun))}"} logger.info "test_juypter: uri->#{uri}, params->#{params}" @@ -48,8 +48,14 @@ module JupyterService tpiID = myshixun.id mount = myshixun.shixun.data_sets.present? - params = {tpiID: tpiID, identifier: shixun.identifier, myshixunIdentifier: myshixun.identifier, needMount: mount, - :containers => "#{Base64.urlsafe_encode64(shixun_container_limit(shixun))}"} + + gitUrl = "#{edu_setting('git_address_domain')}/#{myshixun.repo_path}" + params = { tpiID: tpiID, + identifier: shixun.identifier, + myshixunIdentifier: myshixun.identifier, + gitUrl: giturl, + needMount: mount, + :containers => "#{Base64.urlsafe_encode64(shixun_container_limit(shixun))}"} res = uri_post uri, params logger.info "test_juypter: #{res}"