summaryrefslogtreecommitdiff
path: root/app/workers/pipeline_notification_worker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/pipeline_notification_worker.rb')
-rw-r--r--app/workers/pipeline_notification_worker.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/workers/pipeline_notification_worker.rb b/app/workers/pipeline_notification_worker.rb
new file mode 100644
index 00000000000..cdb860b6675
--- /dev/null
+++ b/app/workers/pipeline_notification_worker.rb
@@ -0,0 +1,12 @@
+class PipelineNotificationWorker
+ include Sidekiq::Worker
+ include PipelineQueue
+
+ def perform(pipeline_id, recipients = nil)
+ pipeline = Ci::Pipeline.find_by(id: pipeline_id)
+
+ return unless pipeline
+
+ NotificationService.new.pipeline_finished(pipeline, recipients)
+ end
+end