diff options
author | Robert Speicher <rspeicher@gmail.com> | 2019-07-23 18:00:11 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2019-07-23 18:00:11 +0300 |
commit | d892e80bf0161b535389c91ccb53539e4f08d790 (patch) | |
tree | f5d2577f457d3320d305e5e40033848e5b783af1 /app | |
parent | 2eda97befe1ce32968040cf2a2b7d87611c0f091 (diff) | |
parent | ab11eee1d6e3881399b671f0ebe857a085321371 (diff) |
Merge branch 'bvl-mark-remote-mirrors-as-failed-sooner' into 'master'
Mark mirrors as failed 1 hour after they started
See merge request gitlab-org/gitlab-ce!30999
Diffstat (limited to 'app')
-rw-r--r-- | app/models/remote_mirror.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/remote_mirror.rb b/app/models/remote_mirror.rb index af705b29f7a..6b5605f9999 100644 --- a/app/models/remote_mirror.rb +++ b/app/models/remote_mirror.rb @@ -31,7 +31,7 @@ class RemoteMirror < ApplicationRecord scope :enabled, -> { where(enabled: true) } scope :started, -> { with_update_status(:started) } - scope :stuck, -> { started.where('last_update_at < ? OR (last_update_at IS NULL AND updated_at < ?)', 1.day.ago, 1.day.ago) } + scope :stuck, -> { started.where('last_update_at < ? OR (last_update_at IS NULL AND updated_at < ?)', 1.hour.ago, 3.hours.ago) } state_machine :update_status, initial: :none do event :update_start do @@ -173,7 +173,7 @@ class RemoteMirror < ApplicationRecord result = URI.parse(url) result.password = '*****' if result.password - result.user = '*****' if result.user && result.user != "git" # tokens or other data may be saved as user + result.user = '*****' if result.user && result.user != 'git' # tokens or other data may be saved as user result.to_s end |