From 5b393cb0040f0cd5459a44db38cd356edfa9fbc3 Mon Sep 17 00:00:00 2001 From: John Simons Date: Tue, 10 May 2016 14:06:30 +1000 Subject: [PATCH] Increased the timeout of repeated failures for EventDispatcher Ensuring that we reset the circuit breaker in EventDispatcher --- src/ServiceControl/ExternalIntegrations/EventDispatcher.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ServiceControl/ExternalIntegrations/EventDispatcher.cs b/src/ServiceControl/ExternalIntegrations/EventDispatcher.cs index 193531c6a6..073fd8d9f2 100644 --- a/src/ServiceControl/ExternalIntegrations/EventDispatcher.cs +++ b/src/ServiceControl/ExternalIntegrations/EventDispatcher.cs @@ -23,7 +23,7 @@ protected override void OnStart() { tokenSource = new CancellationTokenSource(); circuitBreaker = new RepeatedFailuresOverTimeCircuitBreaker("EventDispatcher", - TimeSpan.FromMinutes(2), + TimeSpan.FromMinutes(5), ex => CriticalError.Raise("Repeated failures when dispatching external integration events.", ex), TimeSpan.FromSeconds(20)); StartDispatcher(); @@ -65,6 +65,8 @@ private void DispatchEvents(CancellationToken token) { token.WaitHandle.WaitOne(TimeSpan.FromSeconds(1)); } + + circuitBreaker.Success(); } }