diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-11-30 11:06:43 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-12-03 12:04:49 +0100 |
commit | 2045a771bfa5a1a32ff04f5bc23d58f1170b6359 (patch) | |
tree | d2fa6584e2abd8cc7865df525cf27576eef73d21 /app/models/project_statistics.rb | |
parent | 2a620e7412c8a658bae9a5b7c9b55b9ac97dd58e (diff) | |
download | gitlab-ce-2045a771bfa5a1a32ff04f5bc23d58f1170b6359.tar.gz |
Rename `job_archive|metadata` to `artifacts_archive|metadata`
Diffstat (limited to 'app/models/project_statistics.rb')
-rw-r--r-- | app/models/project_statistics.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/project_statistics.rb b/app/models/project_statistics.rb index 17b9d2cf7b4..b3d4c82583c 100644 --- a/app/models/project_statistics.rb +++ b/app/models/project_statistics.rb @@ -35,6 +35,9 @@ class ProjectStatistics < ActiveRecord::Base end def update_build_artifacts_size + # REMARK: + # We perform dual calculation as we run SQL query: sum does not instantiate AR model. + # The Ci::Build#artifacts_size returns sum of ci_builds.artifacts_size and ci_job_artifacts.file_size self.build_artifacts_size = project.builds.sum(:artifacts_size) + Ci::JobArtifact.artifacts_size_for(self) |