Skip to content

Commit

Permalink
Move retries registration out of condition
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmarbach committed Jan 24, 2024
1 parent 62930c6 commit 7817bcb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/ServiceControl/Recoverability/RecoverabilityComponent.cs
Expand Up @@ -59,12 +59,11 @@ public override void Configure(Settings settings, IHostApplicationBuilder hostBu
}

//Retries
services.AddSingleton<RetryDocumentManager>();
services.AddSingleton<RetriesGateway>();
services.AddSingleton<RetryProcessor>();
if (settings.RunRetryProcessor)
{
services.AddSingleton<RetryDocumentManager>();
services.AddSingleton<RetriesGateway>();
services.AddSingleton<RetryProcessor>();

services.AddHostedService<RebuildRetryGroupStatusesHostedService>();
services.AddHostedService<BulkRetryBatchCreationHostedService>();
services.AddHostedService<AdoptOrphanBatchesFromPreviousSessionHostedService>();
Expand Down

0 comments on commit 7817bcb

Please sign in to comment.