repo_content的一些提示

dev_forum
jingquan huang 6 years ago
parent 1f6f1dadec
commit 4534e8fd0e

@ -505,17 +505,18 @@ class GamesController < ApplicationController
res = uri_post uri, rep_params res = uri_post uri, rep_params
uid_logger("repo_content to bridge: res is #{res}") uid_logger("repo_content to bridge: res is #{res}")
# res值0 表示正常;-1表示有错误-2表示代码版本库没了 # res值0 表示正常;-1表示有错误-2表示代码版本库没了
if status == 0 && res && (res['code'] == -2 || res['code'] == -1) #
# 删除不需要的仓库 if status == 0 && res
begin # 版本库报错,修复不了
GitService.delete_repository(repo_path: @myshixun.repo_path) if res['code'] == -1 || res['code'] == -2
rescue Exception => e begin
uid_logger_error("#{e.message}") # GitService.delete_repository(repo_path: @myshixun.repo_path) if res['code'] == -1
# 终端循环 project_fork(@myshixun, @shixun.repo_path, current_user.login)
tip_exception("#{e.message}") rescue Exception => e
uid_logger_error("#{e.message}")
tip_exception("#{e.message}")
end
end end
# fork一个新的仓库
# project_fork(@myshixun, @shixun.repo_path, current_user.login)
end end
rescue Exception => e rescue Exception => e
uid_logger_error(e.message) uid_logger_error(e.message)

Loading…
Cancel
Save