diff --git a/LittleShop/Services/BotDiscoveryService.cs b/LittleShop/Services/BotDiscoveryService.cs index 828a3d3..4a08e42 100644 --- a/LittleShop/Services/BotDiscoveryService.cs +++ b/LittleShop/Services/BotDiscoveryService.cs @@ -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); } }