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>2020-12-22 15:10:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-12-22 15:10:09 +0300
commit5393d9eb26fb71826e048798806c05906c169e61 (patch)
treeda351541f962a10c7faf7b546946424ddc549c43 /app/models/concerns/ci
parent081e00122e3f8d55f04a0a34485256d82a9b8933 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/concerns/ci')
-rw-r--r--app/models/concerns/ci/artifactable.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/concerns/ci/artifactable.rb b/app/models/concerns/ci/artifactable.rb
index 24df86dbc3c..cbe7d3b6abb 100644
--- a/app/models/concerns/ci/artifactable.rb
+++ b/app/models/concerns/ci/artifactable.rb
@@ -18,7 +18,8 @@ module Ci
gzip: 3
}, _suffix: true
- scope :expired, -> (limit) { where('expire_at < ?', Time.current).limit(limit) }
+ scope :expired_before, -> (timestamp) { where(arel_table[:expire_at].lt(timestamp)) }
+ scope :expired, -> (limit) { expired_before(Time.current).limit(limit) }
end
def each_blob(&blk)