diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
commit | 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch) | |
tree | 544930fb309b30317ae9797a9683768705d664c4 /app/models/packages/event.rb | |
parent | 4b1de649d0168371549608993deac953eb692019 (diff) |
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'app/models/packages/event.rb')
-rw-r--r-- | app/models/packages/event.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/models/packages/event.rb b/app/models/packages/event.rb index 959c94931ec..13da82d16d3 100644 --- a/app/models/packages/event.rb +++ b/app/models/packages/event.rb @@ -25,7 +25,7 @@ class Packages::Event < ApplicationRecord enum originator_type: { user: 0, deploy_token: 1, guest: 2 } def self.allowed_event_name(event_scope, event_type, originator) - return unless event_allowed?(event_scope, event_type, originator) + return unless event_allowed?(event_type) # remove `package` from the event name to avoid issues with HLLRedisCounter class parsing "i_package_#{event_scope}_#{originator}_#{event_type.gsub(/_packages?/, "")}" @@ -33,8 +33,7 @@ class Packages::Event < ApplicationRecord # Remove some of the events, for now, so we don't hammer Redis too hard. # See: https://gitlab.com/gitlab-org/gitlab/-/issues/280770 - def self.event_allowed?(event_scope, event_type, originator) - return false if originator.to_sym == :guest + def self.event_allowed?(event_type) return true if UNIQUE_EVENTS_ALLOWED.include?(event_type.to_sym) false |