Skip to content

Commit 79405b8

Browse files
committed
modify retries count
1 parent 19dfd68 commit 79405b8

25 files changed

Lines changed: 50 additions & 48 deletions

File tree

global.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>$(NetCoreTargetVersion)</TargetFramework>
5+
<LangVersion>$(LangVersion)</LangVersion>
56
</PropertyGroup>
67

78
<ItemGroup>

src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<RootNamespace>Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator</RootNamespace>
77
<DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
88
<GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>
9-
<LangVersion>8.0</LangVersion>
9+
<LangVersion>$(LangVersion)</LangVersion>
1010
</PropertyGroup>
1111

1212
<ItemGroup>

src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<RootNamespace>Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator</RootNamespace>
77
<DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
88
<GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>
9-
<LangVersion>8.0</LangVersion>
9+
<LangVersion>$(LangVersion)</LangVersion>
1010
</PropertyGroup>
1111

1212
<ItemGroup>

src/Services/Basket/Basket.API/Basket.API.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
66
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
77
<GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>
8-
<LangVersion>8.0</LangVersion>
8+
<LangVersion>$(LangVersion)</LangVersion>
99
</PropertyGroup>
1010

1111
<ItemGroup>

src/Services/Catalog/Catalog.API/Catalog.API.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
<PackageId>Catalog.API</PackageId>
99
<UserSecretsId>aspnet-Catalog.API-20161122013618</UserSecretsId>
1010
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
11-
<LangVersion>8.0</LangVersion>
11+
<GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>
12+
<LangVersion>$(LangVersion)</LangVersion>
1213
</PropertyGroup>
1314

1415

src/Services/Catalog/Catalog.API/Startup.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,15 @@ public static IServiceCollection AddCustomHealthCheck(this IServiceCollection se
202202

203203
public static IServiceCollection AddCustomDbContext(this IServiceCollection services, IConfiguration configuration)
204204
{
205-
services.AddDbContext<CatalogContext>(options =>
205+
services.AddEntityFrameworkSqlServer()
206+
.AddDbContext<CatalogContext>(options =>
206207
{
207208
options.UseSqlServer(configuration["ConnectionString"],
208209
sqlServerOptionsAction: sqlOptions =>
209210
{
210211
sqlOptions.MigrationsAssembly(typeof(Startup).GetTypeInfo().Assembly.GetName().Name);
211212
//Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency
212-
sqlOptions.EnableRetryOnFailure(maxRetryCount: 10, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null);
213+
sqlOptions.EnableRetryOnFailure(maxRetryCount: 15, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null);
213214
});
214215

215216
// Changing default behavior when client evaluation occurs to throw.
@@ -225,7 +226,7 @@ public static IServiceCollection AddCustomDbContext(this IServiceCollection serv
225226
{
226227
sqlOptions.MigrationsAssembly(typeof(Startup).GetTypeInfo().Assembly.GetName().Name);
227228
//Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency
228-
sqlOptions.EnableRetryOnFailure(maxRetryCount: 10, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null);
229+
sqlOptions.EnableRetryOnFailure(maxRetryCount: 15, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null);
229230
});
230231
});
231232

src/Services/Identity/Identity.API/Identity.API.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<TargetFramework>$(NetCoreTargetVersion)</TargetFramework>
55
<UserSecretsId>aspnet-eShopOnContainers.Identity-90487118-103c-4ff0-b9da-e5e26f7ab0c5</UserSecretsId>
66
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
7+
<GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>
8+
<LangVersion>$(LangVersion)</LangVersion>
79
</PropertyGroup>
810

911
<ItemGroup>

src/Services/Identity/Identity.API/Startup.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
88
using Microsoft.AspNetCore.Hosting;
99
using Microsoft.AspNetCore.Identity;
10-
using Microsoft.AspNetCore.Mvc;
1110
using Microsoft.EntityFrameworkCore;
1211
using Microsoft.eShopOnContainers.Services.Identity.API.Certificates;
1312
using Microsoft.eShopOnContainers.Services.Identity.API.Data;
@@ -54,9 +53,6 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
5453

5554
services.Configure<AppSettings>(Configuration);
5655

57-
services.AddMvc()
58-
.SetCompatibilityVersion(CompatibilityVersion.Version_3_0);
59-
6056
if (Configuration.GetValue<string>("IsClusterEnv") == bool.TrueString)
6157
{
6258
services.AddDataProtection(opts =>

src/Services/Location/Locations.API/Locations.API.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<TargetFramework>$(NetCoreTargetVersion)</TargetFramework>
55
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
66
<UserSecretsId>aspnet-Locations.API-20161122013619</UserSecretsId>
7+
<GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>
78
<LangVersion>$(LangVersion)</LangVersion>
89
</PropertyGroup>
910
<ItemGroup>

0 commit comments

Comments
 (0)