Skip to content

Commit

Permalink
Update internal usage of the CircuitBreaker
Browse files Browse the repository at this point in the history
  • Loading branch information
ismaelhamed committed Mar 23, 2020
1 parent 7ba587d commit bfa8ebb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Expand Up @@ -558,6 +558,7 @@ protected BatchingSqlJournal(BatchingSqlJournalSetup setup)
_serialization = Context.System.Serialization;
Log = Context.GetLogger();
_circuitBreaker = CircuitBreaker.Create(
Context.System.Scheduler,
maxFailures: Setup.CircuitBreakerSettings.MaxFailures,
callTimeout: Setup.CircuitBreakerSettings.CallTimeout,
resetTimeout: Setup.CircuitBreakerSettings.ResetTimeout);
Expand Down
1 change: 1 addition & 0 deletions src/core/Akka.Persistence/Journal/AsyncWriteJournal.cs
Expand Up @@ -54,6 +54,7 @@ protected AsyncWriteJournal()
CanPublish = extension.Settings.Internal.PublishPluginCommands;
var config = extension.ConfigFor(Self);
_breaker = new CircuitBreaker(
Context.System.Scheduler,
config.GetInt("circuit-breaker.max-failures", 0),
config.GetTimeSpan("circuit-breaker.call-timeout", null),
config.GetTimeSpan("circuit-breaker.reset-timeout", null));
Expand Down
1 change: 1 addition & 0 deletions src/core/Akka.Persistence/Snapshot/SnapshotStore.cs
Expand Up @@ -38,6 +38,7 @@ protected SnapshotStore()
_publish = extension.Settings.Internal.PublishPluginCommands;
var config = extension.ConfigFor(Self);
_breaker = CircuitBreaker.Create(
Context.System.Scheduler,
config.GetInt("circuit-breaker.max-failures", 0),
config.GetTimeSpan("circuit-breaker.call-timeout", null),
config.GetTimeSpan("circuit-breaker.reset-timeout", null));
Expand Down

0 comments on commit bfa8ebb

Please sign in to comment.