Program.cs cleanup, HiveModel change, log level change

Clean up HiveMind Minimal API setup - move configuration to extenstion methods, same for CommunicationControl, move RequestSchema for Hive to HiveModel, make ComControl use it, set minimum log level for files to Information
This commit is contained in:
dsokolovrudakov
2025-02-19 23:02:15 +02:00
parent 744f9ea8e2
commit 21a6a22a9e
19 changed files with 207 additions and 109 deletions
@@ -31,6 +31,7 @@ namespace DevOpsProject.HiveMind.Logic.Services
{
var request = new HiveConnectRequest
{
HiveSchema = _communicationConfigurationOptions.RequestSchema,
HiveIP = _communicationConfigurationOptions.HiveIP,
HivePort = _communicationConfigurationOptions.HivePort,
HiveID = _communicationConfigurationOptions.HiveID
@@ -68,7 +69,6 @@ namespace DevOpsProject.HiveMind.Logic.Services
HiveInMemoryState.OperationalArea = hiveConnectResponse.OperationalArea;
HiveInMemoryState.CurrentLocation = _communicationConfigurationOptions.InitialLocation;
// HERE - we are starting to send telemetry
StartTelemetry();
}
else
@@ -80,7 +80,7 @@ namespace DevOpsProject.HiveMind.Logic.Services
else
{
_logger.LogError($"Failed to connect hive, terminating process");
System.Diagnostics.Process.GetCurrentProcess().Kill();
Environment.Exit(1);
}
}