summaryrefslogtreecommitdiff
path: root/app/workers/emails_on_push_worker.rb
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-03-13 13:42:43 +0000
committerNick Thomas <nick@gitlab.com>2019-03-13 13:42:43 +0000
commit9f05e97aad33a0cd70862f67101bdcb3fddc639a (patch)
treea9868d2c6711ebff1dcbb06f6d09f91d15caa631 /app/workers/emails_on_push_worker.rb
parent5ed9c5f7f74d7305bb884a6ae7a601d4563398a4 (diff)
downloadgitlab-ce-9f05e97aad33a0cd70862f67101bdcb3fddc639a.tar.gz
Run rubocop -a
Diffstat (limited to 'app/workers/emails_on_push_worker.rb')
-rw-r--r--app/workers/emails_on_push_worker.rb34
1 files changed, 16 insertions, 18 deletions
diff --git a/app/workers/emails_on_push_worker.rb b/app/workers/emails_on_push_worker.rb
index 17ad1d5ab88..ed3e354e4c2 100644
--- a/app/workers/emails_on_push_worker.rb
+++ b/app/workers/emails_on_push_worker.rb
@@ -52,24 +52,22 @@ class EmailsOnPushWorker
end
valid_recipients(recipients).each do |recipient|
- begin
- send_email(
- recipient,
- project_id,
- author_id: author_id,
- ref: ref,
- action: action,
- compare: compare,
- reverse_compare: reverse_compare,
- diff_refs: diff_refs,
- send_from_committer_email: send_from_committer_email,
- disable_diffs: disable_diffs
- )
-
- # These are input errors and won't be corrected even if Sidekiq retries
- rescue Net::SMTPFatalError, Net::SMTPSyntaxError => e
- logger.info("Failed to send e-mail for project '#{project.full_name}' to #{recipient}: #{e}")
- end
+ send_email(
+ recipient,
+ project_id,
+ author_id: author_id,
+ ref: ref,
+ action: action,
+ compare: compare,
+ reverse_compare: reverse_compare,
+ diff_refs: diff_refs,
+ send_from_committer_email: send_from_committer_email,
+ disable_diffs: disable_diffs
+ )
+
+ # These are input errors and won't be corrected even if Sidekiq retries
+ rescue Net::SMTPFatalError, Net::SMTPSyntaxError => e
+ logger.info("Failed to send e-mail for project '#{project.full_name}' to #{recipient}: #{e}")
end
ensure
@email = nil