diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-21 18:10:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-21 18:10:51 +0300 |
commit | 42d323de78244a6654a5f11ec16abcec8a849e81 (patch) | |
tree | 9d0024970e0200b857cf2074f981eff37dc5482f /app/services/web_hook_service.rb | |
parent | 5af83f077226003d33b040ebd46fe4c5a16a5bac (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/web_hook_service.rb')
-rw-r--r-- | app/services/web_hook_service.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/services/web_hook_service.rb b/app/services/web_hook_service.rb index 82a7e8501cd..1ffc51bec77 100644 --- a/app/services/web_hook_service.rb +++ b/app/services/web_hook_service.rb @@ -27,7 +27,6 @@ class WebHookService REQUEST_BODY_SIZE_LIMIT = 25.megabytes GITLAB_EVENT_HEADER = 'X-Gitlab-Event' - MAX_FAILURES = 100 attr_accessor :hook, :data, :hook_name, :request_options @@ -144,10 +143,9 @@ class WebHookService if response.success? || response.redirection? hook.enable! elsif response.internal_server_error? - next_backoff = hook.next_backoff - hook.update!(disabled_until: next_backoff.from_now, backoff_count: hook.backoff_count + 1) + hook.backoff! else - hook.update!(recent_failures: hook.recent_failures + 1) if hook.recent_failures < MAX_FAILURES + hook.failed! end end |