Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-10-19 09:32:55 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2017-10-23 12:02:23 +0300
commit430e7671397a1c022b88da31328a5a81409671b5 (patch)
tree44dfbf4deb769d418968ba1505c9d1b2fa4b92f2 /lib/gitlab/git/storage/null_circuit_breaker.rb
parent1881d4f8ecbf52afd7bc732cd6c1296fafd38405 (diff)
Implement backoff for the circuitbreaker
The circuitbreaker now has 2 failure modes: - Backing off: This will raise the `Gitlab::Git::Storage::Failing` exception. Access to the shard is blocked temporarily. - Circuit broken: This will raise the `Gitlab::Git::Storage::CircuitBroken` exception. Access to the shard will be blocked until the failures are reset.
Diffstat (limited to 'lib/gitlab/git/storage/null_circuit_breaker.rb')
-rw-r--r--lib/gitlab/git/storage/null_circuit_breaker.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/git/storage/null_circuit_breaker.rb b/lib/gitlab/git/storage/null_circuit_breaker.rb
index 60c6791a7e4..a12d52d295f 100644
--- a/lib/gitlab/git/storage/null_circuit_breaker.rb
+++ b/lib/gitlab/git/storage/null_circuit_breaker.rb
@@ -25,6 +25,10 @@ module Gitlab
!!@error
end
+ def backing_off?
+ false
+ end
+
def last_failure
circuit_broken? ? Time.now : nil
end