Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-05-19 00:07:37 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-19 00:07:37 +0300
commit1f6abbe6fa099f6d3d7629cfee85049020b54b33 (patch)
treed294f2d89c0edc61b3d23d196851757ce2842220 /app/models/projects/build_artifacts_size_refresh.rb
parent6b5d8b17e28741bccf31029633cc5af7ceab1486 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/projects/build_artifacts_size_refresh.rb')
-rw-r--r--app/models/projects/build_artifacts_size_refresh.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/models/projects/build_artifacts_size_refresh.rb b/app/models/projects/build_artifacts_size_refresh.rb
index 959f486a50a..f411dbe88ed 100644
--- a/app/models/projects/build_artifacts_size_refresh.rb
+++ b/app/models/projects/build_artifacts_size_refresh.rb
@@ -83,9 +83,14 @@ module Projects
def next_batch(limit:)
project.job_artifacts.select(:id, :size)
- .where('created_at <= ? AND id > ?', refresh_started_at, last_job_artifact_id.to_i)
- .order(:created_at)
+ .created_at_before(refresh_started_at)
+ .id_after(last_job_artifact_id.to_i)
+ .ordered_by_created_at_and_id_asc
.limit(limit)
end
+
+ def started?
+ !created?
+ end
end
end