diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2018-12-05 18:22:52 +0300 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2018-12-12 05:08:17 +0300 |
commit | b65cb237cee0b1a8dfdc21a09f2b181d0edf5bde (patch) | |
tree | dffc212c6e7ca84c1e61ec1625e53548c0b6de18 /app/mailers/emails/remote_mirrors.rb | |
parent | 80eebd8e33c5f2f26bc0fdd233d9d92c51edd242 (diff) |
Send a notification email on mirror update errors
The email is sent to project maintainers containing the last mirror
update error. This will allow maintainers to set alarms and react
accordingly.
Diffstat (limited to 'app/mailers/emails/remote_mirrors.rb')
-rw-r--r-- | app/mailers/emails/remote_mirrors.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/mailers/emails/remote_mirrors.rb b/app/mailers/emails/remote_mirrors.rb new file mode 100644 index 00000000000..2018eb7260b --- /dev/null +++ b/app/mailers/emails/remote_mirrors.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Emails + module RemoteMirrors + def remote_mirror_update_failed_email(remote_mirror_id, recipient_id) + @remote_mirror = RemoteMirrorFinder.new(id: remote_mirror_id).execute + @project = @remote_mirror.project + + mail(to: recipient(recipient_id), subject: subject('Remote mirror update failed')) + end + end +end |