diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2018-12-05 12:22:52 -0300 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2018-12-11 23:08:17 -0300 |
commit | b65cb237cee0b1a8dfdc21a09f2b181d0edf5bde (patch) | |
tree | dffc212c6e7ca84c1e61ec1625e53548c0b6de18 /app/finders | |
parent | 80eebd8e33c5f2f26bc0fdd233d9d92c51edd242 (diff) | |
download | gitlab-ce-b65cb237cee0b1a8dfdc21a09f2b181d0edf5bde.tar.gz |
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/finders')
-rw-r--r-- | app/finders/remote_mirror_finder.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/finders/remote_mirror_finder.rb b/app/finders/remote_mirror_finder.rb new file mode 100644 index 00000000000..420db0077aa --- /dev/null +++ b/app/finders/remote_mirror_finder.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class RemoteMirrorFinder + attr_accessor :params + + def initialize(params) + @params = params + end + + # rubocop: disable CodeReuse/ActiveRecord + def execute + RemoteMirror.find_by(id: params[:id]) + end + # rubocop: enable CodeReuse/ActiveRecord +end |