Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e97fd6cd3f | |||
| 7f4246ac63 |
+6
@@ -13,6 +13,8 @@ public class ProcessEmailNotificationsEventHandler(IDbContextFactory<ShopDbConte
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
logger.LogInformation("Started");
|
||||||
|
|
||||||
using var context = await contextFactory.CreateDbContextAsync(cancellationToken);
|
using var context = await contextFactory.CreateDbContextAsync(cancellationToken);
|
||||||
|
|
||||||
var notifications = await context.Notifications
|
var notifications = await context.Notifications
|
||||||
@@ -52,6 +54,10 @@ public class ProcessEmailNotificationsEventHandler(IDbContextFactory<ShopDbConte
|
|||||||
{
|
{
|
||||||
logger.LogError(ex, ex.Message);
|
logger.LogError(ex, ex.Message);
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
logger.LogInformation("Finished");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<Result> SendEmailAsync(Notification notification, EmailService service, CancellationToken cancellationToken = default)
|
private async Task<Result> SendEmailAsync(Notification notification, EmailService service, CancellationToken cancellationToken = default)
|
||||||
|
|||||||
Reference in New Issue
Block a user