diff --git a/CertReports.Syncfusion/Helpers/HealthChecks.cs b/CertReports.Syncfusion/Helpers/HealthChecks.cs
index 7794dbe..19afaca 100644
--- a/CertReports.Syncfusion/Helpers/HealthChecks.cs
+++ b/CertReports.Syncfusion/Helpers/HealthChecks.cs
@@ -33,37 +33,3 @@ public class DatabaseHealthCheck : IHealthCheck
}
}
-///
-/// Verifica connettività al servizio chart esterno.
-///
-public class ChartServiceHealthCheck : IHealthCheck
-{
- private readonly IHttpClientFactory _httpClientFactory;
- private readonly string _baseUrl;
-
- public ChartServiceHealthCheck(IHttpClientFactory httpClientFactory, IConfiguration config)
- {
- _httpClientFactory = httpClientFactory;
- _baseUrl = config["ChartService:BaseUrl"] ?? "";
- }
-
- public async Task CheckHealthAsync(
- HealthCheckContext context, CancellationToken cancellationToken = default)
- {
- if (string.IsNullOrEmpty(_baseUrl))
- return HealthCheckResult.Degraded("ChartService:BaseUrl non configurato.");
-
- try
- {
- var client = _httpClientFactory.CreateClient("ChartService");
- var response = await client.GetAsync(_baseUrl, cancellationToken);
- return response.IsSuccessStatusCode
- ? HealthCheckResult.Healthy("Chart service raggiungibile.")
- : HealthCheckResult.Degraded($"Chart service risponde con status {response.StatusCode}.");
- }
- catch (Exception ex)
- {
- return HealthCheckResult.Degraded("Chart service non raggiungibile.", ex);
- }
- }
-}
diff --git a/CertReports.Syncfusion/Program.cs b/CertReports.Syncfusion/Program.cs
index b9d5f0c..c4d8338 100644
--- a/CertReports.Syncfusion/Program.cs
+++ b/CertReports.Syncfusion/Program.cs
@@ -27,16 +27,9 @@ builder.Services.AddMemoryCache(options =>
options.SizeLimit = 200 * 1024 * 1024; // 200 MB max
});
-// HttpClient factory per chiamate al chart service
-builder.Services.AddHttpClient("ChartService", client =>
-{
- client.Timeout = TimeSpan.FromSeconds(30);
-});
-
// Health checks
builder.Services.AddHealthChecks()
- .AddCheck("database", tags: new[] { "db", "ready" })
- .AddCheck("chart-service", tags: new[] { "external", "ready" });
+ .AddCheck("database", tags: new[] { "db", "ready" });
// Registra i servizi applicativi
builder.Services.AddScoped();
diff --git a/CertReports.Syncfusion/appsettings.json b/CertReports.Syncfusion/appsettings.json
index 7b9e495..40c6fba 100644
--- a/CertReports.Syncfusion/appsettings.json
+++ b/CertReports.Syncfusion/appsettings.json
@@ -5,10 +5,6 @@
"Syncfusion": {
"LicenseKey": "Ngo9BigBOggjGyl/VkV+XU9AclRDX3xKf0x/TGpQb19xflBPallYVBYiSV9jS3hTdURrWH9ccXRUQmhUUE91XA=="
},
- "ChartService": {
- "BaseUrl": "https://reports.smart-roots.net:4004",
- "ChartEndpoint": "/ChartFSWeb.aspx?width=800&height=600&isin={0}&tipo=pdf"
- },
"CryptoSettings": {
"Passphrase": "ddCE3hM9BNJXgwtj"
},