🐛 Optimize order handling

This commit is contained in:
2025-09-09 00:51:51 +08:00
parent 8308325b73
commit 74f51036b1
5 changed files with 8 additions and 5 deletions

View File

@@ -39,6 +39,7 @@ public class BroadcastEventHandler(
if (order is null)
{
logger.LogWarning("Order with ID {OrderId} not found.", evt.OrderId);
await nats.PublishAsync(PaymentOrderEventBase.Type, msg.Data, cancellationToken: stoppingToken);
continue;
}
@@ -49,6 +50,7 @@ public class BroadcastEventHandler(
catch (Exception ex)
{
logger.LogError(ex, "Error processing payment order event for order {OrderId}", evt?.OrderId);
await nats.PublishAsync(PaymentOrderEventBase.Type, msg.Data, cancellationToken: stoppingToken);
}
}
}