File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 1- using Microsoft . Playwright ;
2- using PdfSmith . HealthChecks ;
1+ using PdfSmith . HealthChecks ;
32
43namespace PdfSmith . BackgroundServices ;
54
65public class InstallPlaywrightBackgroundService ( PlaywrightHealthCheck playwrightHealthCheck , ILogger < InstallPlaywrightBackgroundService > logger ) : BackgroundService
76{
87 protected override async Task ExecuteAsync ( CancellationToken stoppingToken )
98 {
10- // On Windows, it is installed in %USERPROFILE%\AppData\Local\ms-playwright by default
11- // We can use PLAYWRIGHT_BROWSERS_PATH environment variable to change the default location
9+ // On Windows, it is installed in %USERPROFILE%\AppData\Local\ms-playwright by default.
10+ // We can use PLAYWRIGHT_BROWSERS_PATH environment variable to change the default location.
1211 var returnCode = await Task . Run ( ( ) =>
1312 {
1413 try
1514 {
1615 return Microsoft . Playwright . Program . Main ( [ "install" , "chromium" ] ) ;
1716 }
18- catch ( PlaywrightException ex )
17+ catch ( Exception ex )
1918 {
2019 logger . LogError ( ex , "Error while installing Chromium" ) ;
2120 return - 1 ;
Original file line number Diff line number Diff line change 171171app . UseRateLimiter ( ) ;
172172app . UseRequestTimeouts ( ) ;
173173
174- app . MapHealthChecks ( "/healthz/ready " , new HealthCheckOptions
174+ app . MapHealthChecks ( "/healthz/live " , new HealthCheckOptions
175175{
176- Predicate = healthCheck => healthCheck . Tags . Contains ( "ready" ) ,
176+ Predicate = _ => false ,
177177 ResponseWriter = HealthChecksResponseWriter ( )
178178} ) ;
179179
180- app . MapHealthChecks ( "/healthz/live " , new HealthCheckOptions
180+ app . MapHealthChecks ( "/healthz/ready " , new HealthCheckOptions
181181{
182- Predicate = _ => false ,
182+ Predicate = healthCheck => healthCheck . Tags . Contains ( "ready" ) ,
183183 ResponseWriter = HealthChecksResponseWriter ( )
184184} ) ;
185185
You can’t perform that action at this time.
0 commit comments