summaryrefslogtreecommitdiff
path: root/app/services/notification_service.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-10-18 20:02:35 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-10-18 20:02:35 +0800
commit045c6715330d25adff95304a3de908037c63a163 (patch)
tree23ed554dd0eed9a2088c1ecf49dd096b77f8a368 /app/services/notification_service.rb
parent12ef494db812de3790ad5f42152f9b3fdf8c9f3c (diff)
downloadgitlab-ce-045c6715330d25adff95304a3de908037c63a163.tar.gz
Use bcc for pipeline emails because:
We use bcc here because we don't want to generate this emails for a thousand times. This could be potentially expensive in a loop, and recipients would contain all project watchers so it could be a lot.
Diffstat (limited to 'app/services/notification_service.rb')
-rw-r--r--app/services/notification_service.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index d4976aa8362..d5d69248af7 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -323,9 +323,7 @@ class NotificationService
nil, # The acting user, who won't be added to recipients
action: pipeline.status).map(&:email)
- recipients.each do |to|
- mailer.public_send(email_template, pipeline, to).deliver_later
- end
+ mailer.public_send(email_template, pipeline, recipients).deliver_later
end
protected