fix: BotDiscoveryService now actually saves discovery status to database
The UpdateBotDiscoveryStatus method was a stub that only logged but never saved the RemoteAddress, RemotePort, DiscoveryStatus, and RemoteInstanceId to the database. Now it properly calls UpdateRemoteInfoAsync. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
a975a9e914
commit
bd0714e920
@ -417,12 +417,15 @@ public class BotDiscoveryService : IBotDiscoveryService
|
||||
|
||||
private async Task UpdateBotDiscoveryStatus(Guid botId, string status, string ipAddress, int port, string? instanceId)
|
||||
{
|
||||
var bot = await _botService.GetBotByIdAsync(botId);
|
||||
if (bot != null)
|
||||
var success = await _botService.UpdateRemoteInfoAsync(botId, ipAddress, port, instanceId, status);
|
||||
if (success)
|
||||
{
|
||||
// Update via direct database access would be better, but for now use a workaround
|
||||
// This would typically be done through a dedicated method on IBotService
|
||||
_logger.LogInformation("Updating bot {BotId} discovery status to {Status}", botId, status);
|
||||
_logger.LogInformation("Updated bot {BotId} discovery status to {Status} at {Address}:{Port}",
|
||||
botId, status, ipAddress, port);
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.LogWarning("Failed to update discovery status for bot {BotId}", botId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user