Appearance
HVC Services — Workers
- Project:
hvc-services
Email sender (Services/EmailSenderService.cs)
A BackgroundService that runs per environment (one per entry in the environments config array). Each instance:
- Subscribes to
OnNewEmail(via the in-process PubSub hub or fromPOST /Notify/email). - Batches
emailOutboxEntries(batch size 20), handles retries/back-off (maxRetrySeconds, error sleep), and sends via the configured channel (Mailgun HTTP API or SMTP) — including.icscalendar attachments. lastId/prevIdtrack the cursor so only new entries are picked up.
Key tunables (in the service): batchSize = 20, sleepTimeMs = 500, errorSleepTimeMs = 1500, sqlErrorSleepTimeMs = 1800000, maxRetrySeconds = 120.
Recording downloader (Services/RecordingDownloaderService.cs)
A BackgroundService that:
- Lists an Azure Blob container for finished recordings (
*.mp4/*.xml). - Parses the filename convention
env__eventId__tenantId__...to know where each file belongs. - Generates SAS URLs, copies the files into the tenant's storage (via
Hvc.Storage), and insertsMediaFile+FileSharerows; setshasRecordingon the event.