Jupyter提示语

dev_tpm_ui
daiao 5 years ago
parent 7c3a85cf17
commit 9036a443c0

@ -772,7 +772,7 @@ class ShixunsController < ApplicationController
# jupyter开启挑战 # jupyter开启挑战
def jupyter_exec def jupyter_exec
begin
if is_shixun_opening? if is_shixun_opening?
tip_show_exception(-3, "#{@shixun.opening_time.strftime('%Y-%m-%d %H:%M:%S')}") tip_show_exception(-3, "#{@shixun.opening_time.strftime('%Y-%m-%d %H:%M:%S')}")
end end
@ -786,22 +786,23 @@ class ShixunsController < ApplicationController
commit_id = commit["id"] commit_id = commit["id"]
cloud_bridge = edu_setting('cloud_bridge') cloud_bridge = edu_setting('cloud_bridge')
myshixun_identifier = generate_identifier Myshixun, 10 myshixun_identifier = generate_identifier Myshixun, 10
ActiveRecord::Base.transaction do begin
@myshixun = @shixun.myshixuns.create!(user_id: current_user.id, identifier: myshixun_identifier, ActiveRecord::Base.transaction do
modify_time: @shixun.modify_time, reset_time: @shixun.reset_time, @myshixun = @shixun.myshixuns.create!(user_id: current_user.id, identifier: myshixun_identifier,
onclick_time: Time.now, commit_id: commit_id) modify_time: @shixun.modify_time, reset_time: @shixun.reset_time,
# fork仓库 onclick_time: Time.now, commit_id: commit_id)
project_fork(@myshixun, @repo_path, current_user.login) # fork仓库
rep_url = Base64.urlsafe_encode64(repo_ip_url @repo_path) project_fork(@myshixun, @repo_path, current_user.login)
uri = "#{cloud_bridge}/bridge/game/openGameInstance" rep_url = Base64.urlsafe_encode64(repo_ip_url @repo_path)
params = {tpiID: "#{@myshixun.id}", tpmGitURL: rep_url, tpiRepoName: @myshixun.repo_name.split("/").last} uri = "#{cloud_bridge}/bridge/game/openGameInstance"
interface_post uri, params, 83, "服务器出现问题,请重置环境" params = {tpiID: "#{@myshixun.id}", tpmGitURL: rep_url, tpiRepoName: @myshixun.repo_name.split("/").last}
interface_post uri, params, 83, "服务器出现问题,请重置环境"
end
rescue => e
uid_logger_error(e.message)
tip_exception("服务器出现问题,请重置环境")
end end
end end
rescue => e
uid_logger_error(e.message)
tip_exception(e.message)
end
end end
def publish def publish

Loading…
Cancel
Save