summaryrefslogtreecommitdiff
path: root/app/models/site_statistic.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/site_statistic.rb')
-rw-r--r--app/models/site_statistic.rb14
1 files changed, 0 insertions, 14 deletions
diff --git a/app/models/site_statistic.rb b/app/models/site_statistic.rb
index 2530a9d8b8e..48324570f0b 100644
--- a/app/models/site_statistic.rb
+++ b/app/models/site_statistic.rb
@@ -73,18 +73,4 @@ class SiteStatistic < ActiveRecord::Base
super
end
-
- def self.recalculate_counters!
- transaction do
- # see https://gitlab.com/gitlab-org/gitlab-ce/issues/48967
- ActiveRecord::Base.connection.execute('SET LOCAL statement_timeout TO 0') if Gitlab::Database.postgresql?
- self.update_all('repositories_count = (SELECT COUNT(*) FROM projects)')
- end
-
- transaction do
- # see https://gitlab.com/gitlab-org/gitlab-ce/issues/48967
- ActiveRecord::Base.connection.execute('SET LOCAL statement_timeout TO 0') if Gitlab::Database.postgresql?
- self.update_all('wikis_count = (SELECT COUNT(*) FROM project_features WHERE wiki_access_level != 0)')
- end
- end
end