summaryrefslogtreecommitdiff
path: root/app/services/projects
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-07 09:08:40 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-07 09:08:40 +0000
commitf6f4bc2bc0f369b0837f01c45c15421f7f3868a3 (patch)
treed5cb6bac8f98e38a28b1d03d921ef5a88404a994 /app/services/projects
parentc793bb6303e1bddb3555577c4c47f46bf9bdcea6 (diff)
downloadgitlab-ce-f6f4bc2bc0f369b0837f01c45c15421f7f3868a3.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/projects')
-rw-r--r--app/services/projects/refresh_build_artifacts_size_statistics_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/projects/refresh_build_artifacts_size_statistics_service.rb b/app/services/projects/refresh_build_artifacts_size_statistics_service.rb
index 794c042ea39..1f86e5f4ba9 100644
--- a/app/services/projects/refresh_build_artifacts_size_statistics_service.rb
+++ b/app/services/projects/refresh_build_artifacts_size_statistics_service.rb
@@ -12,7 +12,7 @@ module Projects
if batch.any?
# We are doing the sum in ruby because the query takes too long when done in SQL
- total_artifacts_size = batch.sum(&:size)
+ total_artifacts_size = batch.sum { |artifact| artifact.size.to_i }
Projects::BuildArtifactsSizeRefresh.transaction do
# Mark the refresh ready for another worker to pick up and process the next batch