diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-10-18 20:02:35 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-10-18 20:02:35 +0800 |
commit | 045c6715330d25adff95304a3de908037c63a163 (patch) | |
tree | 23ed554dd0eed9a2088c1ecf49dd096b77f8a368 /app/services/notification_service.rb | |
parent | 12ef494db812de3790ad5f42152f9b3fdf8c9f3c (diff) | |
download | gitlab-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.rb | 4 |
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 |