Made small tweak to startup
This commit is contained in:
parent
0fd20ee962
commit
5397e8d5c8
@ -16,11 +16,9 @@ builder.Services.AddTransient<IIdentityService, IdentityService>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
try
|
||||
{
|
||||
if (!await app.CheckHealthAsync())
|
||||
{
|
||||
return 1;
|
||||
return;
|
||||
}
|
||||
|
||||
app.UseServiceDefaults();
|
||||
@ -36,11 +34,3 @@ try
|
||||
eventBus.Subscribe<OrderStartedIntegrationEvent, OrderStartedIntegrationEventHandler>();
|
||||
|
||||
await app.RunAsync();
|
||||
|
||||
return 0;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
app.Logger.LogCritical(ex, "Program terminated unexpectedly");
|
||||
return 1;
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ builder.AddServiceDefaults();
|
||||
builder.Services.AddGrpc();
|
||||
builder.Services.AddControllers();
|
||||
|
||||
// Applcation specific services
|
||||
// Application specific services
|
||||
builder.Services.AddDbContexts(builder.Configuration);
|
||||
builder.Services.AddApplicationOptions(builder.Configuration);
|
||||
builder.Services.AddHealthChecks(builder.Configuration);
|
||||
@ -18,6 +18,11 @@ builder.Services.AddTransient<OrderStatusChangedToPaidIntegrationEventHandler>()
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
if (!await app.CheckHealthAsync())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
app.UseServiceDefaults();
|
||||
|
||||
app.UseFileServer(new FileServerOptions
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"UseCustomizationData": false,
|
||||
"AzureServiceBusEnabled": false,
|
||||
"AzureStorageEnabled": false,
|
||||
"ApplicationInsights": {
|
||||
"InstrumentationKey": ""
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"OpenApi": {
|
||||
"Endpoint": {
|
||||
@ -22,6 +22,12 @@
|
||||
"EventBus": {
|
||||
"SubscriptionClientName": "Catalog",
|
||||
"RetryCount": 5
|
||||
}
|
||||
},
|
||||
"ApplicationInsights": {
|
||||
"InstrumentationKey": ""
|
||||
},
|
||||
"UseCustomizationData": false,
|
||||
"AzureServiceBusEnabled": false,
|
||||
"AzureStorageEnabled": false
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user