diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-02-16 17:31:37 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-02-17 11:38:18 +0100 |
commit | a9e0301c230a81242d476f30d7089565919214b3 (patch) | |
tree | 42ef1c550a463f32a330050b6a4e0985246a004e /app/workers | |
parent | 300e16065a4fca95ff04de96d31e34f57cf9a4a4 (diff) | |
download | gitlab-ce-a9e0301c230a81242d476f30d7089565919214b3.tar.gz |
Expire caches after forking/importing a repository
This ensures the caches for Repository#empty? and
Repository#has_visible_content? are flushed after a repository has been
imported or forked.
Fixes gitlab-org/gitlab-ce#13505
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/repository_fork_worker.rb | 1 | ||||
-rw-r--r-- | app/workers/repository_import_worker.rb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/app/workers/repository_fork_worker.rb b/app/workers/repository_fork_worker.rb index 2f991c52339..2572b9d6d98 100644 --- a/app/workers/repository_fork_worker.rb +++ b/app/workers/repository_fork_worker.rb @@ -27,6 +27,7 @@ class RepositoryForkWorker return end + project.repository.expire_emptiness_caches project.import_finish end end diff --git a/app/workers/repository_import_worker.rb b/app/workers/repository_import_worker.rb index e295a9ddd14..0b6f746e118 100644 --- a/app/workers/repository_import_worker.rb +++ b/app/workers/repository_import_worker.rb @@ -18,6 +18,7 @@ class RepositoryImportWorker return end + project.repository.expire_emptiness_caches project.import_finish end end |