|
|
|
@ -213,4 +213,27 @@ module JupyterService
|
|
|
|
|
_jupyter_active(tpiID)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def _jupyter_timeinfo(tpiID)
|
|
|
|
|
shixun_tomcat = edu_setting('cloud_bridge')
|
|
|
|
|
uri = "#{shixun_tomcat}/bridge/jupyter/getTimeInfo"
|
|
|
|
|
params = {:tpiID => tpiID}
|
|
|
|
|
res = uri_post uri, params
|
|
|
|
|
if res && res['code'].to_i != 0
|
|
|
|
|
raise("实训云平台繁忙(繁忙等级:130)")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
res['data']
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# 获取时间参数
|
|
|
|
|
def jupyter_timeinfo_tpm(shixun)
|
|
|
|
|
tpiID = "tpm#{shixun.id}"
|
|
|
|
|
_jupyter_timeinfo(tpiID)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# 获取时间参数
|
|
|
|
|
def jupyter_timeinfo_tpi(myshixun)
|
|
|
|
|
tpiID = myshixun.id
|
|
|
|
|
_jupyter_timeinfo(tpiID)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|