Skip to content

Commit 08b623e

Browse files
committed
Update project settings and SignalR handlers
- Modified `G4.Bots.Monitor.csproj` to comment out `DebugType` and `DebugSymbols`, maintaining single file publishing settings. - Added a new SignalR handler for "StopBot" in `Program.cs` to allow graceful application exit. - Updated `launchSettings.json` to change `HubUri` to a Kubernetes address, updated `Id`, and adjusted `ListenerUri` for broader network access.
1 parent 3dbec34 commit 08b623e

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

src/G4.Bots.Monitor/G4.Bots.Monitor.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
<TrimUnusedDependencies>true</TrimUnusedDependencies>
99
<EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
1010
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
11+
<!--
1112
<DebugType>none</DebugType>
1213
<DebugSymbols>false</DebugSymbols>
14+
-->
1315
</PropertyGroup>
1416

1517
<ItemGroup>

src/G4.Bots.Monitor/Program.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,13 @@
156156
// Exits the application when the SignalR hub sends a "stop" message
157157
connection.On("StopMonitor", () => Environment.Exit(0));
158158

159+
// Exits the application when the SignalR hub sends a "stop" message
160+
connection.On("StopBot", () =>
161+
{
162+
// Close bot /stop
163+
Environment.Exit(0);
164+
});
165+
159166
// Keep the application running
160167
await Task.Delay(Timeout.Infinite, cancellationTokenSource.Token);
161168

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"profiles": {
3-
"G4.Bots.Monitor": {
4-
"commandName": "Project",
5-
"commandLineArgs": "--HubUri=http://localhost:9944 --Name=g4-static-bot --Type=static-bot --ListenerUri=http://localhost:8080/bot/v1/g4-static-bot --Id=1234567890"
6-
},
7-
"Container (Dockerfile)": {
8-
"commandName": "Docker"
9-
}
10-
}
2+
"profiles": {
3+
"G4.Bots.Monitor": {
4+
"commandName": "Project",
5+
"commandLineArgs": "--HubUri=http://host.k8s.internal:9944 --Name=g4-static-bot --Id=1745429122201 --Type=Static Bot --ListenerUri=http://+:52607/bot/v1/g4-static-bot"
6+
},
7+
"Container (Dockerfile)": {
8+
"commandName": "Docker"
9+
}
10+
}
1111
}

0 commit comments

Comments
 (0)