|
|
|
@ -28,7 +28,9 @@ class JupytersController < ApplicationController
|
|
|
|
|
shixun = game.myshixun.shixun
|
|
|
|
|
shixun_tomcat = edu_setting('cloud_bridge')
|
|
|
|
|
uri = "#{shixun_tomcat}/bridge/jupyter/get"
|
|
|
|
|
params = {tpiID: game.myshixun.id, :containers => "#{Base64.urlsafe_encode64(shixun_container_limit(shixun))}"}
|
|
|
|
|
|
|
|
|
|
tpiID = game.myshixun.id
|
|
|
|
|
params = {tpiID: tpiID, :containers => "#{Base64.urlsafe_encode64(shixun_container_limit(shixun))}"}
|
|
|
|
|
res = uri_post uri, params
|
|
|
|
|
|
|
|
|
|
logger.info "test_juypter: #{res}"
|
|
|
|
@ -36,6 +38,8 @@ class JupytersController < ApplicationController
|
|
|
|
|
if res && res['code'].to_i != 0
|
|
|
|
|
raise("实训云平台繁忙(繁忙等级:99)")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
render plain: "https://#{res['port']}.jupyter.educoder.net/notebooks/data/workspace/myshixun_#{tpiID}/01.ipynb"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|