mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
更改:回调异常处理
This commit is contained in:
@@ -29,7 +29,7 @@ class SyncRepository < ApplicationRecord
|
|||||||
validates :repo_name, uniqueness: { message: "已存在" }
|
validates :repo_name, uniqueness: { message: "已存在" }
|
||||||
|
|
||||||
def unbind_reposyncer
|
def unbind_reposyncer
|
||||||
Reposync::DeleteRepoService.call(self.repo_name)
|
Reposync::DeleteRepoService.call(self.repo_name) rescue nil
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ class SyncRepositoryBranch < ApplicationRecord
|
|||||||
|
|
||||||
def unbind_reposyncer
|
def unbind_reposyncer
|
||||||
if self.sync_repository.sync_direction.to_i == 1
|
if self.sync_repository.sync_direction.to_i == 1
|
||||||
Reposync::DeleteBranchService.call(self.sync_repository&.repo_name, self.gitlink_branch_name)
|
Reposync::DeleteBranchService.call(self.sync_repository&.repo_name, self.gitlink_branch_name) rescue nil
|
||||||
else
|
else
|
||||||
Reposync::DeleteBranchService.call(self.sync_repository&.repo_name, self.external_branch_name)
|
Reposync::DeleteBranchService.call(self.sync_repository&.repo_name, self.external_branch_name) rescue nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user