diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2019-03-22 15:10:38 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2019-03-22 17:16:32 +0300 |
commit | e64589a370c9536f8701c4b7124242b2d1016ec1 (patch) | |
tree | 430675ab3ee1afe5d6fc4cd1a245dfa9d48cf0f4 /app/workers/project_cache_worker.rb | |
parent | 80fea82f3ab6afd486884020710eb01c06b048d9 (diff) |
Refresh commit count after repository head changes
Diffstat (limited to 'app/workers/project_cache_worker.rb')
-rw-r--r-- | app/workers/project_cache_worker.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/workers/project_cache_worker.rb b/app/workers/project_cache_worker.rb index d27b5e62574..b31099bc670 100644 --- a/app/workers/project_cache_worker.rb +++ b/app/workers/project_cache_worker.rb @@ -27,6 +27,7 @@ class ProjectCacheWorker # rubocop: enable CodeReuse/ActiveRecord def update_statistics(project, statistics = []) + return if Gitlab::Database.read_only? return unless try_obtain_lease_for(project.id, :update_statistics) Rails.logger.info("Updating statistics for project #{project.id}") |