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:
authorLin Jen-Shin <godfat@godfat.org>2016-10-17 13:18:16 +0300
committerLin Jen-Shin <godfat@godfat.org>2016-10-17 13:18:16 +0300
commit0f21b1313b853d92b722b32ac25b8ad6a4860a63 (patch)
tree19146b8480aa6182f39c667da124143d1b755e79 /app/workers/pipeline_notification_worker.rb
parent7e1b9196c413927e4db5e38c40ee944ef6d29884 (diff)
Skip if cannot find pipeline, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6342/diffs#note_17038807
Diffstat (limited to 'app/workers/pipeline_notification_worker.rb')
-rw-r--r--app/workers/pipeline_notification_worker.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/workers/pipeline_notification_worker.rb b/app/workers/pipeline_notification_worker.rb
index f4e9a4cf245..68e72f7382f 100644
--- a/app/workers/pipeline_notification_worker.rb
+++ b/app/workers/pipeline_notification_worker.rb
@@ -2,7 +2,9 @@ class PipelineNotificationWorker
include Sidekiq::Worker
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)
end