refactor: save current workspace state including FinlyticAnalyzer fixes, FinlyticApp trade route alignment, and DTO audit documentation

This commit is contained in:
2026-08-12 18:30:42 +02:00
parent a9553e9fbf
commit 3d8af3940b
163 changed files with 3421 additions and 1751 deletions
+32 -11
View File
@@ -79,7 +79,6 @@ public class AnalyzerMqttClient : ManagedMqttClient, IHostedService
_logger.LogInformation("[{Channel}] Analyzer MQTT Client connected. Subscribing to topics and RPC response channels...", "AnalyzerChannel");
// Incoming Event Topics
await SubscribeAsync("services/news/completed");
await SubscribeAsync("services/news/#");
await SubscribeAsync("finlytic/news/raw/#");
await SubscribeAsync("finlytic/market/ticks/#");
@@ -420,7 +419,21 @@ public class AnalyzerMqttClient : ManagedMqttClient, IHostedService
}
catch (Exception ex)
{
_logger.LogError(ex, "[{Channel}] Failed to handle manual trigger.", "AnalyzerChannel");
_logger.LogError(ex, "[{Channel}] Failed to handle manual trigger for correlation {CorrelationId}.", "AnalyzerChannel", correlationId);
try
{
var errorResponse = new ManualAnalysisResponseDto
{
Status = "ERROR",
Message = $"Analysis failed: {ex.Message}"
};
await PublishAsync($"services/response/analyzer_TriggerManual/{correlationId}",
JsonSerializer.Serialize(errorResponse, FinlyticJsonSerializerContext.Default.ManualAnalysisResponseDto));
}
catch (Exception pubEx)
{
_logger.LogError(pubEx, "[{Channel}] Failed to publish error response for correlation {CorrelationId}.", "AnalyzerChannel", correlationId);
}
}
}
@@ -522,11 +535,23 @@ public class AnalyzerMqttClient : ManagedMqttClient, IHostedService
{
var isinReq = new IsinRequest(filterResult.Isin);
livePriceResp = await SendRpcRequestAsync<FinlyticCore.Dtos.TechnicalAnalysis.LivePriceDto, IsinRequest>(
"tr_GetLivePrice", isinReq, TimeSpan.FromSeconds(3));
taResp = await SendRpcRequestAsync<FinlyticCore.Dtos.TechnicalAnalysis.TechnicalAnalysisDto, IsinRequest>(
"ta_GetAnalysis", isinReq, TimeSpan.FromSeconds(3));
// Parallel RPC calls (was sequential — up to 12s latency reduced to ~3s)
var livePriceTask = SendRpcRequestAsync<FinlyticCore.Dtos.TechnicalAnalysis.LivePriceDto, IsinRequest>(
"tr_GetLivePrice", isinReq, TimeSpan.FromSeconds(5));
var taTask = SendRpcRequestAsync<FinlyticCore.Dtos.TechnicalAnalysis.TechnicalAnalysisDto, IsinRequest>(
"ta_GetAnalysis", isinReq, TimeSpan.FromSeconds(5));
var fundTask = SendRpcRequestAsync<FinlyticCore.Dtos.Fundamentals.AssetFundamentalsDto, IsinRequest>(
"fundamentals_Get", isinReq, TimeSpan.FromSeconds(5));
var sentTask = SendRpcRequestAsync<FinlyticCore.Dtos.Sentiment.IsinSentimentSummaryDto, IsinRequest>(
"sentiment_GetIsin", isinReq, TimeSpan.FromSeconds(5));
await Task.WhenAll(livePriceTask, taTask, fundTask, sentTask);
livePriceResp = livePriceTask.Result;
taResp = taTask.Result;
fundResp = fundTask.Result;
var sentResp = sentTask.Result;
if (taResp?.Indicators != null)
{
var latestIndicator = taResp.Indicators.LastOrDefault();
@@ -547,8 +572,6 @@ public class AnalyzerMqttClient : ManagedMqttClient, IHostedService
};
}
fundResp = await SendRpcRequestAsync<FinlyticCore.Dtos.Fundamentals.AssetFundamentalsDto, IsinRequest>(
"fundamentals_Get", isinReq, TimeSpan.FromSeconds(3));
if (fundResp != null)
{
resolvedSymbol = !string.IsNullOrWhiteSpace(fundResp.Ticker) ? fundResp.Ticker : resolvedSymbol;
@@ -571,8 +594,6 @@ public class AnalyzerMqttClient : ManagedMqttClient, IHostedService
};
}
var sentResp = await SendRpcRequestAsync<FinlyticCore.Dtos.Sentiment.IsinSentimentSummaryDto, IsinRequest>(
"sentiment_GetIsin", isinReq, TimeSpan.FromSeconds(3));
if (sentResp != null)
{
sentInfo = new SentimentContextInfo