refactor: modularize email processing logic and improve service structure

- Extract email template handling, rendering, and sending code into `Worker.Services` project.
- Introduce `EmailTemplateService`, `EmailTemplateRenderingService`, and `SendEmailService`.
- Simplify consumer logic by delegating to scoped services.
- Update project dependencies and package references accordingly.
This commit is contained in:
Anatolii Grynchuk
2026-05-14 22:15:15 +03:00
parent 0861e18cec
commit 25fb48ccf0
18 changed files with 394 additions and 174 deletions
@@ -1,4 +1,14 @@
{
"App": {
"ConnectionString": "Host=192.168.2.121;Port=55435;Database=hrynco_ns_prod;Username=ns_user;Password=HAwS0c4A1QmH",
"RabbitMq": {
"Host": "192.168.2.121",
"Port": 5675,
"User": "ns_user",
"Password": "LN22mEWYdfCy",
"VirtualHost": "/"
}
},
"Serilog": {
"MinimumLevel": {
"Default": "Debug",
@@ -7,6 +17,20 @@
"Microsoft.EntityFrameworkCore": "Information",
"Microsoft.AspNetCore": "Information"
}
},
"WriteTo": [
{ "Name": "Console" },
{
"Name": "Seq",
"Args": {
"serverUrl": "http://192.168.2.121:5341"
}
}
],
"Enrich": [ "FromLogContext" ],
"Properties": {
"Application": "hrynco-notification-service-worker",
"Environment": "Development"
}
}
}