版本库迁移如果没迁移完成处理

dev_forum
jingquan huang 6 years ago
parent eef2e988c2
commit 9cfb2c2a19

@ -489,7 +489,13 @@ class GamesController < ApplicationController
path = path.try(:strip)
uid_logger("--rep_content: path is #{path}")
begin
@content = git_fle_content(@myshixun.repo_path, path) || ""
if @myshixun.repo_name.nil?
g = Gitlab.client
repo_name = g.project(@myshixun.gpid).path_with_namespace
@myshixun.update_column(:repo_name, repo_name)
end
@content = git_fle_content("#{repo_name}.git", path) || ""
rescue Exception => e
# 思路: 异常首先应该考虑去恢复
if params[:retry].to_i == 1

Loading…
Cancel
Save