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/workers/repository_update_remote_mirror_worker.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/workers/repository_update_remote_mirror_worker.rb')
-rw-r--r-- | app/workers/repository_update_remote_mirror_worker.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/workers/repository_update_remote_mirror_worker.rb b/app/workers/repository_update_remote_mirror_worker.rb index 9d4e67deb9c..a06db4b08cc 100644 --- a/app/workers/repository_update_remote_mirror_worker.rb +++ b/app/workers/repository_update_remote_mirror_worker.rb @@ -16,7 +16,7 @@ class RepositoryUpdateRemoteMirrorWorker end def perform(remote_mirror_id, scheduled_time) - remote_mirror = RemoteMirror.find(remote_mirror_id) + remote_mirror = RemoteMirrorFinder.new(id: remote_mirror_id).execute return if remote_mirror.updated_since?(scheduled_time) raise UpdateAlreadyInProgressError if remote_mirror.update_in_progress? |