Commit 896c3a0a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

remove update_repository calls

parent 5c649266
...@@ -27,7 +27,6 @@ class Namespace < ActiveRecord::Base ...@@ -27,7 +27,6 @@ class Namespace < ActiveRecord::Base
after_create :ensure_dir_exist after_create :ensure_dir_exist
after_update :move_dir after_update :move_dir
after_commit :update_gitolite, on: :update, if: :require_update_gitolite
after_destroy :rm_dir after_destroy :rm_dir
scope :root, where('type IS NULL') scope :root, where('type IS NULL')
...@@ -89,11 +88,6 @@ class Namespace < ActiveRecord::Base ...@@ -89,11 +88,6 @@ class Namespace < ActiveRecord::Base
end end
end end
def update_gitolite
@require_update_gitolite = false
projects.each(&:update_repository)
end
def rm_dir def rm_dir
dir_path = File.join(Gitlab.config.gitolite.repos_path, path) dir_path = File.join(Gitlab.config.gitolite.repos_path, path)
FileUtils.rm_r( dir_path, force: true ) FileUtils.rm_r( dir_path, force: true )
......
...@@ -112,7 +112,6 @@ class ProjectTeam ...@@ -112,7 +112,6 @@ class ProjectTeam
source_team.each do |tm| source_team.each do |tm|
tm.save tm.save
end end
target_project.update_repository
end end
true true
......
...@@ -18,13 +18,6 @@ class ProtectedBranch < ActiveRecord::Base ...@@ -18,13 +18,6 @@ class ProtectedBranch < ActiveRecord::Base
validates :name, presence: true validates :name, presence: true
validates :project, presence: true validates :project, presence: true
after_save :update_repository
after_destroy :update_repository
def update_repository
project.update_repository
end
def commit def commit
project.repository.commit(self.name) project.repository.commit(self.name)
end end
......
...@@ -81,11 +81,6 @@ class UsersProject < ActiveRecord::Base ...@@ -81,11 +81,6 @@ class UsersProject < ActiveRecord::Base
end end
end end
GitoliteWorker.perform_async(
:update_repositories,
project_ids
)
true true
rescue rescue
false false
...@@ -100,11 +95,6 @@ class UsersProject < ActiveRecord::Base ...@@ -100,11 +95,6 @@ class UsersProject < ActiveRecord::Base
end end
end end
GitoliteWorker.perform_async(
:update_repositories,
project_ids
)
true true
rescue rescue
false false
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment