Browse Source

Changed HealthCheck Cache duration time (Zero == No Cache) configuration for the Basket microservice. This is better for demos and can be changed at any time.

pull/241/head
Cesar De la Torre 7 years ago
parent
commit
c7c176c4c1
2 changed files with 4 additions and 2 deletions
  1. +3
    -1
      src/Services/Basket/Basket.API/Startup.cs
  2. +1
    -1
      src/Web/WebStatus/Startup.cs

+ 3
- 1
src/Services/Basket/Basket.API/Startup.cs View File

@ -58,7 +58,9 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
services.AddHealthChecks(checks =>
{
checks.AddValueTaskCheck("HTTP Endpoint", () => new ValueTask<IHealthCheckResult>(HealthCheckResult.Healthy("Ok")));
checks.AddValueTaskCheck("HTTP Endpoint", () => new ValueTask<IHealthCheckResult>(HealthCheckResult.Healthy("Ok")),
TimeSpan.Zero //No cache for this HealthCheck, better just for demos
);
});
services.Configure<BasketSettings>(Configuration);


+ 1
- 1
src/Web/WebStatus/Startup.cs View File

@ -39,7 +39,7 @@ namespace WebStatus
}
checks.AddUrlCheckIfNotNull(Configuration["OrderingUrl"], TimeSpan.FromMinutes(minutes));
checks.AddUrlCheckIfNotNull(Configuration["BasketUrl"], TimeSpan.FromMinutes(minutes));
checks.AddUrlCheckIfNotNull(Configuration["BasketUrl"], TimeSpan.Zero); //No cache for this HealthCheck, better just for demos
checks.AddUrlCheckIfNotNull(Configuration["CatalogUrl"], TimeSpan.FromMinutes(minutes));
checks.AddUrlCheckIfNotNull(Configuration["IdentityUrl"], TimeSpan.FromMinutes(minutes));
checks.AddUrlCheckIfNotNull(Configuration["LocationsUrl"], TimeSpan.FromMinutes(minutes));


Loading…
Cancel
Save