diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-31 18:10:41 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-31 18:10:41 +0300 |
commit | 2368893df711f330cd210005e616fc3b6003ff31 (patch) | |
tree | d48874fb1279741f8e97a7f397e46d14ac2df05f /app/models/namespace | |
parent | 729eabcb410add9dbcfa46677308003dc95a64d0 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/namespace')
-rw-r--r-- | app/models/namespace/root_storage_statistics.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/app/models/namespace/root_storage_statistics.rb b/app/models/namespace/root_storage_statistics.rb index 2ad6ea59588..5723a823e98 100644 --- a/app/models/namespace/root_storage_statistics.rb +++ b/app/models/namespace/root_storage_statistics.rb @@ -2,7 +2,16 @@ class Namespace::RootStorageStatistics < ApplicationRecord SNIPPETS_SIZE_STAT_NAME = 'snippets_size'.freeze - STATISTICS_ATTRIBUTES = %W(storage_size repository_size wiki_size lfs_objects_size build_artifacts_size packages_size #{SNIPPETS_SIZE_STAT_NAME}).freeze + STATISTICS_ATTRIBUTES = %W( + storage_size + repository_size + wiki_size + lfs_objects_size + build_artifacts_size + packages_size + #{SNIPPETS_SIZE_STAT_NAME} + pipeline_artifacts_size + ).freeze self.primary_key = :namespace_id @@ -40,7 +49,8 @@ class Namespace::RootStorageStatistics < ApplicationRecord 'COALESCE(SUM(ps.lfs_objects_size), 0) AS lfs_objects_size', 'COALESCE(SUM(ps.build_artifacts_size), 0) AS build_artifacts_size', 'COALESCE(SUM(ps.packages_size), 0) AS packages_size', - "COALESCE(SUM(ps.snippets_size), 0) AS #{SNIPPETS_SIZE_STAT_NAME}" + "COALESCE(SUM(ps.snippets_size), 0) AS #{SNIPPETS_SIZE_STAT_NAME}", + 'COALESCE(SUM(ps.pipeline_artifacts_size), 0) AS pipeline_artifacts_size' ) end |