diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-14 21:12:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-14 21:12:48 +0300 |
commit | 35f525b5e4c2246f2411f627d4c119c5b2c5ae81 (patch) | |
tree | faa8eb9ded77bae862b881e9128a919e74ad1c5e /app/models/packages | |
parent | c014b6b4e5c33180dd5cbff1dd1bb4623d1eca80 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/packages')
-rw-r--r-- | app/models/packages/package.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/packages/package.rb b/app/models/packages/package.rb index 431c18d02f0..b4c09d99bb0 100644 --- a/app/models/packages/package.rb +++ b/app/models/packages/package.rb @@ -333,6 +333,12 @@ class Packages::Package < ApplicationRecord name.gsub(/#{Gitlab::Regex::Packages::PYPI_NORMALIZED_NAME_REGEX_STRING}/o, '-').downcase end + def touch_last_downloaded_at + ::Gitlab::Database::LoadBalancing::Session.without_sticky_writes do + update_column(:last_downloaded_at, Time.zone.now) + end + end + private def composer_tag_version? |