From 8ed738fbc5f81cd83ccc45085e696d36bc9442a5 Mon Sep 17 00:00:00 2001 From: John Lambert Date: Fri, 2 Aug 2024 16:01:07 -0400 Subject: [PATCH] Hotfix to fix health messaging --- .vscode/launch.json | 26 ++++++++++++++++++- .../Services/S3HealthCheck.cs | 2 +- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index c2e4e6f8..24d96910 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -30,6 +30,28 @@ "/app": "${workspaceFolder}" }, }, + { + "name": "Machine Engine Docker", + "type": "docker", + "containerName": "machine-engine-cntr", + "request": "attach", + "platform": "netCore", + "processName": "Serval.Machine.EngineServer", + "sourceFileMap": { + "/app": "${workspaceFolder}" + }, + }, + { + "name": "Machine Job Docker", + "type": "docker", + "containerName": "machine-job-cntr", + "request": "attach", + "platform": "netCore", + "processName": "Serval.Machine.JobServer", + "sourceFileMap": { + "/app": "${workspaceFolder}" + }, + }, { "name": "Launch Serval", "type": "coreclr", @@ -90,7 +112,9 @@ "justMyCode": false, "configurations": [ "ServalApi Docker", - "Echo Docker" + "Echo Docker", + "Machine Engine Docker", + "Machine Job Docker" ] } ] diff --git a/src/Machine/src/Serval.Machine.Shared/Services/S3HealthCheck.cs b/src/Machine/src/Serval.Machine.Shared/Services/S3HealthCheck.cs index 69eedc14..3918b703 100644 --- a/src/Machine/src/Serval.Machine.Shared/Services/S3HealthCheck.cs +++ b/src/Machine/src/Serval.Machine.Shared/Services/S3HealthCheck.cs @@ -16,7 +16,7 @@ public async Task CheckHealthAsync( var request = new ListObjectsV2Request { BucketName = new Uri(_options.Value.Uri).Host, - Prefix = new Uri(_options.Value.Uri).AbsolutePath + "/models/", + Prefix = new Uri(_options.Value.Uri).AbsolutePath.TrimStart('/'), MaxKeys = 1, Delimiter = "" };