Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-27 21:09:21 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-27 21:09:21 +0300
commite0fa0638a422c3e20d4423c9bb69d79afc9c7d3d (patch)
tree9abb3c0706576bbda895fe9539a55556930606e2 /app/workers/pipeline_notification_worker.rb
parentf8d15ca65390475e356b06dedc51e10ccd179f86 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers/pipeline_notification_worker.rb')
-rw-r--r--app/workers/pipeline_notification_worker.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/app/workers/pipeline_notification_worker.rb b/app/workers/pipeline_notification_worker.rb
index e9081cc416f..72663fa19ae 100644
--- a/app/workers/pipeline_notification_worker.rb
+++ b/app/workers/pipeline_notification_worker.rb
@@ -8,12 +8,20 @@ class PipelineNotificationWorker # rubocop:disable Scalability/IdempotentWorker
worker_resource_boundary :cpu
# rubocop: disable CodeReuse/ActiveRecord
- def perform(pipeline_id, recipients = nil)
- pipeline = Ci::Pipeline.find_by(id: pipeline_id)
+ def perform(pipeline_id, args = {})
+ case args
+ when Hash
+ ref_status = args[:ref_status]
+ recipients = args[:recipients]
+ else # TODO: backward compatible interface, can be removed in 12.10
+ recipients = args
+ ref_status = nil
+ end
+ pipeline = Ci::Pipeline.find_by(id: pipeline_id)
return unless pipeline
- NotificationService.new.pipeline_finished(pipeline, recipients)
+ NotificationService.new.pipeline_finished(pipeline, ref_status: ref_status, recipients: recipients)
end
# rubocop: enable CodeReuse/ActiveRecord
end