Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-chervet committed Nov 11, 2023
1 parent f77701f commit 996db97
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/SlimFaas/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,18 @@

#pragma warning restore CA2252
var mockRedis = Environment.GetEnvironmentVariable(EnvironmentVariables.MockRedis);
//if (!string.IsNullOrEmpty(mockRedis))
if (!string.IsNullOrEmpty(mockRedis))
{
// serviceCollection.AddSingleton<IRedisService, RedisMockService>();
serviceCollection.AddSingleton<IRedisService, RedisMockService>();
}
//else
else
{
serviceCollection.AddSingleton<IRedisService, SlimDataService>();
serviceCollection.AddHttpClient<IRedisService, SlimDataService>()
.SetHandlerLifetime(TimeSpan.FromMinutes(5)).ConfigurePrimaryHttpMessageHandler(() => new HttpClientHandler()
{
AllowAutoRedirect = true
});;
});
}
serviceCollection.AddSingleton<IMasterService, MasterService>();

Expand Down

0 comments on commit 996db97

Please sign in to comment.