From afcdbedd398b5bcebeaea03a2f1ad2158900339c Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sun, 22 Sep 2019 17:50:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E9=87=8D=E8=AF=95=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E7=94=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/games_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 4a087ae7a..d72c534a0 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -477,6 +477,10 @@ class GamesController < ApplicationController tip_exception("代码获取异常,请检查实训模板的评测设置是否正确") else # 报错继续retry + if params[:retry].to_i == 1 + # 如果报错了,并且retry 为1的时候,则fork一个新的仓库 + project_fork(@myshixun, @shixun.repo_path, current_user.login) + end tip_exception(-3, "#{e.message}") end end