summaryrefslogtreecommitdiff
path: root/app/workers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-08 06:08:50 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-08 06:08:50 +0000
commit6397f0322d3841d98d64e9c60bb84b94c40617d7 (patch)
treecc54eebf050e102dcf7394f5b94b7699148050df /app/workers
parent91ed938e3d17d385a08459915972d7e3f6b8468e (diff)
downloadgitlab-ce-6397f0322d3841d98d64e9c60bb84b94c40617d7.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/all_queues.yml6
-rw-r--r--app/workers/ci/pipeline_bridge_status_worker.rb19
2 files changed, 25 insertions, 0 deletions
diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml
index b344e1e36b8..51b91e8e8be 100644
--- a/app/workers/all_queues.yml
+++ b/app/workers/all_queues.yml
@@ -531,6 +531,12 @@
:latency_sensitive:
:resource_boundary: :unknown
:weight: 3
+- :name: pipeline_default:ci_pipeline_bridge_status
+ :feature_category: :continuous_integration
+ :has_external_dependencies:
+ :latency_sensitive: true
+ :resource_boundary: :cpu
+ :weight: 3
- :name: pipeline_default:pipeline_metrics
:feature_category: :continuous_integration
:has_external_dependencies:
diff --git a/app/workers/ci/pipeline_bridge_status_worker.rb b/app/workers/ci/pipeline_bridge_status_worker.rb
new file mode 100644
index 00000000000..f196573deaa
--- /dev/null
+++ b/app/workers/ci/pipeline_bridge_status_worker.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+module Ci
+ class PipelineBridgeStatusWorker
+ include ::ApplicationWorker
+ include ::PipelineQueue
+
+ latency_sensitive_worker!
+ worker_resource_boundary :cpu
+
+ def perform(pipeline_id)
+ ::Ci::Pipeline.find_by_id(pipeline_id).try do |pipeline|
+ ::Ci::PipelineBridgeStatusService
+ .new(pipeline.project, pipeline.user)
+ .execute(pipeline)
+ end
+ end
+ end
+end