将调度内核标识从 SimpleLite 全面重命名为 Simple3。

配置段/环境变量、Launcher、健康检查 API、OpenAPI 与前后端文案同步;兼容探测旧 SimpleLite 进程名。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
黄兆尉
2026-08-26 17:46:52 +08:00
co-authored by Cursor
parent 912c44c9bb
commit 3686abdc78
79 changed files with 922 additions and 832 deletions
+9 -9
View File
@@ -7,13 +7,13 @@ using MiGu.Server.Ota;
namespace MiGu.Server.Fleet;
/// <summary>
/// 车队健康:保留 SimpleLite 的 CPU/故障率等,延迟改为对 WatchDog(:9776) 做 TCP RTT。
/// SimpleLite /fleet/health 探测的是车载 HTTP :8081,多数现场未开该端口会假超时 2000ms。
/// 车队健康:保留 Simple3 的 CPU/故障率等,延迟改为对 WatchDog(:9776) 做 TCP RTT。
/// Simple3 /fleet/health 探测的是车载 HTTP :8081,多数现场未开该端口会假超时 2000ms。
/// </summary>
public sealed class FleetHealthService
{
private readonly IHttpClientFactory _httpFactory;
private readonly SimpleLiteOptions _sl;
private readonly Simple3Options _sl;
private readonly InternalTokenStore _token;
private readonly WatchDogClient _wd;
private readonly ILogger<FleetHealthService> _log;
@@ -25,7 +25,7 @@ public sealed class FleetHealthService
public FleetHealthService(
IHttpClientFactory httpFactory,
IOptions<SimpleLiteOptions> sl,
IOptions<Simple3Options> sl,
InternalTokenStore token,
WatchDogClient wd,
ILogger<FleetHealthService> log)
@@ -39,7 +39,7 @@ public sealed class FleetHealthService
public async Task<List<FleetHealthRowDto>> GetAsync(CancellationToken ct)
{
var rows = await FetchSimpleLiteHealthAsync(ct);
var rows = await FetchSimple3HealthAsync(ct);
if (rows.Count == 0)
rows = await BuildRowsFromCarsAsync(ct);
@@ -50,7 +50,7 @@ public sealed class FleetHealthService
{
if (string.IsNullOrWhiteSpace(row.Ip))
{
// 无 IP 时保留 SimpleLite 原探测结果
// 无 IP 时保留 Simple3 原探测结果
row.LatencySource ??= row.LatencyMs != null ? "onboard" : "none";
return;
}
@@ -75,7 +75,7 @@ public sealed class FleetHealthService
}
else
{
// WatchDog 不通:若 SimpleLite 车载探测成功则保留,否则标不可达
// WatchDog 不通:若 Simple3 车载探测成功则保留,否则标不可达
if (row.Reachable == true && row.LatencyMs is > 0 and < 2000)
{
row.LatencySource = "onboard";
@@ -93,7 +93,7 @@ public sealed class FleetHealthService
return rows;
}
private async Task<List<FleetHealthRowDto>> FetchSimpleLiteHealthAsync(CancellationToken ct)
private async Task<List<FleetHealthRowDto>> FetchSimple3HealthAsync(CancellationToken ct)
{
var port = _sl.ProjectionPort > 0 ? _sl.ProjectionPort : 8222;
try
@@ -114,7 +114,7 @@ public sealed class FleetHealthService
}
catch (Exception ex)
{
_log.LogDebug(ex, "fleet/health from SimpleLite failed");
_log.LogDebug(ex, "fleet/health from Simple3 failed");
return new();
}
}