StatusService Aktivierung

This commit is contained in:
2026-05-07 11:37:48 +02:00
parent bb4ca9c104
commit 1511f91d5b
4 changed files with 12 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using System.ServiceModel;
using System.ServiceModel.Web;
@@ -38,6 +39,13 @@ namespace BeWo.Service.ServiceImplementations.Enhanced
result.Services.Add(CheckService("AIModule", CheckAiModule()));
result.Services.Add(CheckService("Web.config", CheckWebConfig()));
var allHealthy = result.DatabaseOk && result.Services.All(x => x.IsOk);
if (!allHealthy)
{
WebOperationContext.Current.OutgoingResponse.StatusCode =
HttpStatusCode.InternalServerError;
}
return result;
}
@@ -98,7 +106,7 @@ namespace BeWo.Service.ServiceImplementations.Enhanced
{
// #1
var url = MergedConfig.GetSetting(WebConfigSetting.AiPromptsUrl);
if (!string.IsNullOrWhiteSpace(url))
if (string.IsNullOrWhiteSpace(url))
return "AiPromptsUrl wurde nicht korrekt konfiguriert";
return null;