diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-28 19:39:02 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-28 19:39:02 +0400 |
commit | 8b54b7233ef58a2a39da9777dbeab59b4024cc75 (patch) | |
tree | 6dbfd49ba68e1b76930281c20dfff607a681744d /app | |
parent | 1c5876eb7b2deb069d919bd19b51c9f6218e0f41 (diff) |
Async perform for add/remove team members
Diffstat (limited to 'app')
-rw-r--r-- | app/models/protected_branch.rb | 2 | ||||
-rw-r--r-- | app/models/users_project.rb | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/app/models/protected_branch.rb b/app/models/protected_branch.rb index 3308caf360a..2e7010ea9c9 100644 --- a/app/models/protected_branch.rb +++ b/app/models/protected_branch.rb @@ -22,7 +22,7 @@ class ProtectedBranch < ActiveRecord::Base after_destroy :update_repository def update_repository - gitolite.update_repository(project) + project.update_repository end def commit diff --git a/app/models/users_project.rb b/app/models/users_project.rb index 3206600413c..183878cb30c 100644 --- a/app/models/users_project.rb +++ b/app/models/users_project.rb @@ -82,9 +82,13 @@ class UsersProject < ActiveRecord::Base users_project.save end end - Gitlab::Gitolite.new.update_repositories(Project.where(id: project_ids)) end + GitoliteWorker.perform_async( + :update_repositories, + project_ids + ) + true rescue false @@ -97,9 +101,13 @@ class UsersProject < ActiveRecord::Base users_project.skip_git = true users_project.destroy end - Gitlab::Gitolite.new.update_repositories(Project.where(id: project_ids)) end + GitoliteWorker.perform_async( + :update_repositories, + project_ids + ) + true rescue false |