Commit 0f21b131 authored by Lin Jen-Shin's avatar Lin Jen-Shin
parent 7e1b9196
...@@ -2,7 +2,9 @@ class PipelineNotificationWorker ...@@ -2,7 +2,9 @@ class PipelineNotificationWorker
include Sidekiq::Worker include Sidekiq::Worker
def perform(pipeline_id, recipients = nil) def perform(pipeline_id, recipients = nil)
pipeline = Ci::Pipeline.find(pipeline_id) pipeline = Ci::Pipeline.find_by(id: pipeline_id)
return unless pipeline
NotificationService.new.pipeline_finished(pipeline, recipients) NotificationService.new.pipeline_finished(pipeline, recipients)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment