diff options
author | Stan Hu <stanhu@gmail.com> | 2016-03-27 16:17:49 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-03-27 16:17:49 +0300 |
commit | 720ef51bd97f478dba2d2c1b59df958dabd7500a (patch) | |
tree | bde1e83469b0ccb258a55bc207b5040642840217 /app/workers | |
parent | c1834664a7a29a32551291102265ece978c55ffe (diff) |
Check if repo exists before attempting to update cache info
Closes #14361
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/project_cache_worker.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/workers/project_cache_worker.rb b/app/workers/project_cache_worker.rb index 55cb6af232e..ccefd0f71a0 100644 --- a/app/workers/project_cache_worker.rb +++ b/app/workers/project_cache_worker.rb @@ -5,6 +5,9 @@ class ProjectCacheWorker def perform(project_id) project = Project.find(project_id) + + return unless project.repository.exists? + project.update_repository_size project.update_commit_count |