diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-22 15:10:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-22 15:10:09 +0300 |
commit | 5393d9eb26fb71826e048798806c05906c169e61 (patch) | |
tree | da351541f962a10c7faf7b546946424ddc549c43 /app/models/concerns/ci | |
parent | 081e00122e3f8d55f04a0a34485256d82a9b8933 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/concerns/ci')
-rw-r--r-- | app/models/concerns/ci/artifactable.rb | 3 |
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) |