更改:回调异常处理
This commit is contained in:
parent
d5c8fe6e56
commit
20e8561815
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue