🐛 Fix queue background service in pusher didn't save notification now

This commit is contained in:
2025-08-24 16:59:27 +08:00
parent d9a5fed77f
commit f8c35c0350
3 changed files with 37 additions and 9 deletions

View File

@@ -81,7 +81,7 @@ public class QueueBackgroundService(
switch (message.Type)
{
case QueueMessageType.Email:
await ProcessEmailMessageAsync(message, scope, cancellationToken);
await ProcessEmailMessageAsync(message, scope);
break;
case QueueMessageType.PushNotification:
@@ -103,8 +103,7 @@ public class QueueBackgroundService(
}
}
private static async Task ProcessEmailMessageAsync(QueueMessage message, IServiceScope scope,
CancellationToken cancellationToken)
private static async Task ProcessEmailMessageAsync(QueueMessage message, IServiceScope scope)
{
var emailService = scope.ServiceProvider.GetRequiredService<EmailService>();
var emailMessage = JsonSerializer.Deserialize<EmailMessage>(message.Data)