Commit 211e435a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Remove project cache before project.destroy

parent f375adcb
...@@ -15,6 +15,10 @@ class ProjectObserver < BaseObserver ...@@ -15,6 +15,10 @@ class ProjectObserver < BaseObserver
project.rename_repo if project.path_changed? project.rename_repo if project.path_changed?
end end
def before_destroy(project)
project.repository.expire_cache unless project.empty_repo?
end
def after_destroy(project) def after_destroy(project)
GitlabShellWorker.perform_async( GitlabShellWorker.perform_async(
:remove_repository, :remove_repository,
......
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