diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-08-21 13:49:57 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-08-21 13:49:57 +0200 |
commit | 48776f2786d22cecab97417141d43060c6cdee26 (patch) | |
tree | 548fa53f25eff1a41267bc2eae61434309ede3b3 /app/workers | |
parent | ce274fd61bbe11c7a1353bff2176273e9b30e197 (diff) | |
download | gitlab-ce-48776f2786d22cecab97417141d43060c6cdee26.tar.gz |
Simplify pipeline sidekiq queues naming scheme
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/concerns/pipeline_queue.rb | 8 | ||||
-rw-r--r-- | app/workers/pipeline_update_worker.rb | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/workers/concerns/pipeline_queue.rb b/app/workers/concerns/pipeline_queue.rb index ed882e3ecef..ddf45b91345 100644 --- a/app/workers/concerns/pipeline_queue.rb +++ b/app/workers/concerns/pipeline_queue.rb @@ -5,14 +5,14 @@ module PipelineQueue extend ActiveSupport::Concern included do - sidekiq_options queue: 'pipelines-default' + sidekiq_options queue: 'pipeline_default' end class_methods do - def enqueue_in(queue:, group:) - raise ArgumentError if queue.empty? || group.empty? + def enqueue_in(group:) + raise ArgumentError, 'Unspecified queue group!' if group.empty? - sidekiq_options queue: "pipelines-#{queue}-#{group}" + sidekiq_options queue: "pipeline_#{group}" end end end diff --git a/app/workers/pipeline_update_worker.rb b/app/workers/pipeline_update_worker.rb index 086d00b7ec8..5fa399dff4c 100644 --- a/app/workers/pipeline_update_worker.rb +++ b/app/workers/pipeline_update_worker.rb @@ -2,7 +2,7 @@ class PipelineUpdateWorker include Sidekiq::Worker include PipelineQueue - enqueue_in queue: :pipeline, group: :processing + enqueue_in group: :processing def perform(pipeline_id) Ci::Pipeline.find_by(id: pipeline_id) |