修改gitea创建gitfile的错误捕获

This commit is contained in:
sylor_huang@126.com 2020-04-20 16:02:36 +08:00
parent 92c76e3438
commit 48f8ce5581
1 changed files with 8 additions and 2 deletions

View File

@ -19,8 +19,14 @@ namespace :gitea_create_repository do
auto_init: true,
private: r.hidden,
}
ActiveRecord::Base.transaction do
begin
gitea_repository = Gitea::Repository::CreateService.new(user.gitea_token, repository_params).call
puts "__________after_create_gitea_repository_____#{gitea_repository}______"
rescue => e
puts "_________create_gitea_git________file______error: #{e}"
end
end
else
puts "__________delete_gitea__repository_failed,status:_____#{delete_gitea.status}______"
end