This website works better with JavaScript.
Home
Explore
Help
Sign In
ayan.poddar
/
eShopOnContainers
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
19
Wiki
Activity
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
73be25e6cf
commit
c7c176c4c1
2 changed files
with
4 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+3
-1
src/Services/Basket/Basket.API/Startup.cs
+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
)
)
;
Write
Preview
Loading…
Cancel
Save