StatusService Aktivierung
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user