diff options
-rw-r--r-- | app/workers/expire_pipeline_cache_worker.rb | 2 | ||||
-rw-r--r-- | app/workers/pipeline_hooks_worker.rb | 2 | ||||
-rw-r--r-- | app/workers/pipeline_metrics_worker.rb | 2 | ||||
-rw-r--r-- | app/workers/pipeline_notification_worker.rb | 2 | ||||
-rw-r--r-- | app/workers/pipeline_process_worker.rb | 2 | ||||
-rw-r--r-- | app/workers/pipeline_success_worker.rb | 2 | ||||
-rw-r--r-- | config/sidekiq_queues.yml | 3 | ||||
-rw-r--r-- | spec/workers/expire_pipeline_cache_worker_spec.rb | 2 | ||||
-rw-r--r-- | spec/workers/pipeline_hooks_worker_spec.rb | 2 | ||||
-rw-r--r-- | spec/workers/pipeline_metrics_worker_spec.rb | 2 | ||||
-rw-r--r-- | spec/workers/pipeline_notification_worker_spec.rb | 2 | ||||
-rw-r--r-- | spec/workers/pipeline_process_worker_spec.rb | 2 | ||||
-rw-r--r-- | spec/workers/pipeline_success_worker_spec.rb | 2 |
13 files changed, 27 insertions, 0 deletions
diff --git a/app/workers/expire_pipeline_cache_worker.rb b/app/workers/expire_pipeline_cache_worker.rb index 7c02d6cf892..1a0e7f92875 100644 --- a/app/workers/expire_pipeline_cache_worker.rb +++ b/app/workers/expire_pipeline_cache_worker.rb @@ -2,6 +2,8 @@ class ExpirePipelineCacheWorker include Sidekiq::Worker include PipelineQueue + enqueue_in group: :cache + def perform(pipeline_id) pipeline = Ci::Pipeline.find_by(id: pipeline_id) return unless pipeline diff --git a/app/workers/pipeline_hooks_worker.rb b/app/workers/pipeline_hooks_worker.rb index 7e36eacebf8..30a75ec8435 100644 --- a/app/workers/pipeline_hooks_worker.rb +++ b/app/workers/pipeline_hooks_worker.rb @@ -2,6 +2,8 @@ class PipelineHooksWorker include Sidekiq::Worker include PipelineQueue + enqueue_in group: :hooks + def perform(pipeline_id) Ci::Pipeline.find_by(id: pipeline_id) .try(:execute_hooks) diff --git a/app/workers/pipeline_metrics_worker.rb b/app/workers/pipeline_metrics_worker.rb index 070943f1ecc..3795105ef28 100644 --- a/app/workers/pipeline_metrics_worker.rb +++ b/app/workers/pipeline_metrics_worker.rb @@ -2,6 +2,8 @@ class PipelineMetricsWorker include Sidekiq::Worker include PipelineQueue + enqueue_in group: :metrics + def perform(pipeline_id) Ci::Pipeline.find_by(id: pipeline_id).try do |pipeline| update_metrics_for_active_pipeline(pipeline) if pipeline.active? diff --git a/app/workers/pipeline_notification_worker.rb b/app/workers/pipeline_notification_worker.rb index cdb860b6675..77ff3913ad7 100644 --- a/app/workers/pipeline_notification_worker.rb +++ b/app/workers/pipeline_notification_worker.rb @@ -2,6 +2,8 @@ class PipelineNotificationWorker include Sidekiq::Worker include PipelineQueue + enqueue_in group: :hooks + def perform(pipeline_id, recipients = nil) pipeline = Ci::Pipeline.find_by(id: pipeline_id) diff --git a/app/workers/pipeline_process_worker.rb b/app/workers/pipeline_process_worker.rb index 357e4a9a1c3..8c067d05081 100644 --- a/app/workers/pipeline_process_worker.rb +++ b/app/workers/pipeline_process_worker.rb @@ -2,6 +2,8 @@ class PipelineProcessWorker include Sidekiq::Worker include PipelineQueue + enqueue_in group: :processing + def perform(pipeline_id) Ci::Pipeline.find_by(id: pipeline_id) .try(:process!) diff --git a/app/workers/pipeline_success_worker.rb b/app/workers/pipeline_success_worker.rb index cc0eb708cf9..cb8bb2ffe75 100644 --- a/app/workers/pipeline_success_worker.rb +++ b/app/workers/pipeline_success_worker.rb @@ -2,6 +2,8 @@ class PipelineSuccessWorker include Sidekiq::Worker include PipelineQueue + enqueue_in group: :processing + def perform(pipeline_id) Ci::Pipeline.find_by(id: pipeline_id).try do |pipeline| MergeRequests::MergeWhenPipelineSucceedsService diff --git a/config/sidekiq_queues.yml b/config/sidekiq_queues.yml index 8e13ed95f19..28cfb9419de 100644 --- a/config/sidekiq_queues.yml +++ b/config/sidekiq_queues.yml @@ -28,6 +28,9 @@ - [build, 2] - [pipeline, 2] - [pipeline_processing, 2] + - [pipeline_cache, 2] + - [pipeline_metrics, 2] + - [pipeline_hooks, 2] - [gitlab_shell, 2] - [email_receiver, 2] - [emails_on_push, 2] diff --git a/spec/workers/expire_pipeline_cache_worker_spec.rb b/spec/workers/expire_pipeline_cache_worker_spec.rb index 54c9a69d329..85b24d5a8f0 100644 --- a/spec/workers/expire_pipeline_cache_worker_spec.rb +++ b/spec/workers/expire_pipeline_cache_worker_spec.rb @@ -43,4 +43,6 @@ describe ExpirePipelineCacheWorker do subject.perform(pipeline.id) end end + + it_behaves_like 'sidekiq worker' end diff --git a/spec/workers/pipeline_hooks_worker_spec.rb b/spec/workers/pipeline_hooks_worker_spec.rb index 035e329839f..50b724d0111 100644 --- a/spec/workers/pipeline_hooks_worker_spec.rb +++ b/spec/workers/pipeline_hooks_worker_spec.rb @@ -20,4 +20,6 @@ describe PipelineHooksWorker do end end end + + it_behaves_like 'sidekiq worker' end diff --git a/spec/workers/pipeline_metrics_worker_spec.rb b/spec/workers/pipeline_metrics_worker_spec.rb index ef71125c0b6..dac0b24d24a 100644 --- a/spec/workers/pipeline_metrics_worker_spec.rb +++ b/spec/workers/pipeline_metrics_worker_spec.rb @@ -47,4 +47,6 @@ describe PipelineMetricsWorker do end end end + + it_behaves_like 'sidekiq worker' end diff --git a/spec/workers/pipeline_notification_worker_spec.rb b/spec/workers/pipeline_notification_worker_spec.rb index eb539ffd893..072866bf375 100644 --- a/spec/workers/pipeline_notification_worker_spec.rb +++ b/spec/workers/pipeline_notification_worker_spec.rb @@ -16,4 +16,6 @@ describe PipelineNotificationWorker, :mailer do subject.perform(Ci::Pipeline.maximum(:id).to_i.succ) end end + + it_behaves_like 'sidekiq worker' end diff --git a/spec/workers/pipeline_process_worker_spec.rb b/spec/workers/pipeline_process_worker_spec.rb index 86e9d7f6684..81570c685ed 100644 --- a/spec/workers/pipeline_process_worker_spec.rb +++ b/spec/workers/pipeline_process_worker_spec.rb @@ -19,4 +19,6 @@ describe PipelineProcessWorker do end end end + + it_behaves_like 'sidekiq worker' end diff --git a/spec/workers/pipeline_success_worker_spec.rb b/spec/workers/pipeline_success_worker_spec.rb index d1c84adda6f..83d006337bd 100644 --- a/spec/workers/pipeline_success_worker_spec.rb +++ b/spec/workers/pipeline_success_worker_spec.rb @@ -21,4 +21,6 @@ describe PipelineSuccessWorker do end end end + + it_behaves_like 'sidekiq worker' end |