diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-14 15:09:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-14 15:09:44 +0000 |
commit | 874ead9c3a50de4c4ca4551eaf5b7eb976d26b50 (patch) | |
tree | 637ee9f2da5e251bc08ebf3e972209d51966bf7c /lib/gitlab/sidekiq_middleware | |
parent | 2e4c4055181eec9186458dd5dd3219c937032ec7 (diff) | |
download | gitlab-ce-874ead9c3a50de4c4ca4551eaf5b7eb976d26b50.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/sidekiq_middleware')
-rw-r--r-- | lib/gitlab/sidekiq_middleware/duplicate_jobs.rb | 24 | ||||
-rw-r--r-- | lib/gitlab/sidekiq_middleware/duplicate_jobs/duplicate_job.rb | 2 |
2 files changed, 1 insertions, 25 deletions
diff --git a/lib/gitlab/sidekiq_middleware/duplicate_jobs.rb b/lib/gitlab/sidekiq_middleware/duplicate_jobs.rb deleted file mode 100644 index 7a77a56d642..00000000000 --- a/lib/gitlab/sidekiq_middleware/duplicate_jobs.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -require 'digest' - -module Gitlab - module SidekiqMiddleware - module DuplicateJobs - DROPPABLE_QUEUES = Set.new([ - Namespaces::RootStatisticsWorker.queue, - Namespaces::ScheduleAggregationWorker.queue - ]).freeze - - def self.drop_duplicates?(queue_name) - Feature.enabled?(:drop_duplicate_sidekiq_jobs) || - drop_duplicates_for_queue?(queue_name) - end - - private_class_method def self.drop_duplicates_for_queue?(queue_name) - DROPPABLE_QUEUES.include?(queue_name) && - Feature.enabled?(:drop_duplicate_sidekiq_jobs_for_queue) - end - end - end -end diff --git a/lib/gitlab/sidekiq_middleware/duplicate_jobs/duplicate_job.rb b/lib/gitlab/sidekiq_middleware/duplicate_jobs/duplicate_job.rb index a9007039334..79bbb99752e 100644 --- a/lib/gitlab/sidekiq_middleware/duplicate_jobs/duplicate_job.rb +++ b/lib/gitlab/sidekiq_middleware/duplicate_jobs/duplicate_job.rb @@ -67,7 +67,7 @@ module Gitlab end def droppable? - idempotent? && duplicate? && DuplicateJobs.drop_duplicates?(queue_name) + idempotent? && duplicate? end private |