|
|
@ -556,10 +556,18 @@ class GamesController < ApplicationController
|
|
|
|
msg = @game.run_code_message
|
|
|
|
msg = @game.run_code_message
|
|
|
|
msg.update_attributes(:status => 0, :message => nil) if msg.present?
|
|
|
|
msg.update_attributes(:status => 0, :message => nil) if msg.present?
|
|
|
|
|
|
|
|
|
|
|
|
# 更新时间是为了TPM端显示的更新,退出实训及访问实训的时候会更新
|
|
|
|
# 更新时间是为了TPM端显示的更新,退出实训及访问实训的时候会更新,如果版本库地址不存在,重新去版本库中找
|
|
|
|
@myshixun.update_column(:updated_at, Time.now)
|
|
|
|
myshixuns_update =
|
|
|
|
|
|
|
|
if @myshixun.repo_name.nil?
|
|
|
|
|
|
|
|
g = Gitlab.client
|
|
|
|
|
|
|
|
repo_name = g.project(@myshixun.gpid).path_with_namespace
|
|
|
|
|
|
|
|
{repo_name: repo_name}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{updated_at: Time.now}
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
@myshixun.update_attributes!(myshixuns_update)
|
|
|
|
gitUrl = repo_ip_url @myshixun.repo_path
|
|
|
|
gitUrl = repo_ip_url @myshixun.repo_path
|
|
|
|
|
|
|
|
|
|
|
|
logger.info("#############giturl: ##{gitUrl}")
|
|
|
|
logger.info("#############giturl: ##{gitUrl}")
|
|
|
|
gitUrl = Base64.urlsafe_encode64(gitUrl)
|
|
|
|
gitUrl = Base64.urlsafe_encode64(gitUrl)
|
|
|
|
|
|
|
|
|
|
|
|