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)
|
private async Task UpdateBotDiscoveryStatus(Guid botId, string status, string ipAddress, int port, string? instanceId)
|
||||||
{
|
{
|
||||||
var bot = await _botService.GetBotByIdAsync(botId);
|
var success = await _botService.UpdateRemoteInfoAsync(botId, ipAddress, port, instanceId, status);
|
||||||
if (bot != null)
|
if (success)
|
||||||
{
|
{
|
||||||
// Update via direct database access would be better, but for now use a workaround
|
_logger.LogInformation("Updated bot {BotId} discovery status to {Status} at {Address}:{Port}",
|
||||||
// This would typically be done through a dedicated method on IBotService
|
botId, status, ipAddress, port);
|
||||||
_logger.LogInformation("Updating bot {BotId} discovery status to {Status}", botId, status);
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_logger.LogWarning("Failed to update discovery status for bot {BotId}", botId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user