Appearance
HVC Sink Api — Workers
- Project:
hvc-sinkapi
Background processing (Services/DirectConferenceProcessorService.cs)
A BackgroundService that starts one conference processor plus one TenantConferenceSyncService per configured environment.
1. DirectConferenceProcessor (Services/DirectConferenceProcessor.cs)
Main loop:
- Fetches finished conferences from Pexip (paginated, ordered by end time).
- Matches them to assigned rooms (configurable matching strategy, e.g.
nearest). - Builds the tenant SQL (participant logs + event completion) and admin SQL (
Meetings,MeetingParticipants). - Writes a
pexipDataEntriesrow that carries the generated SQL for later execution, then resets the room assignment.
2. TenantConferenceSyncService (Features/PexipDataLoader/TenantConferenceSyncService.cs)
- Polls
pexipDataEntriesand dispatches each entry to a per-tenantChannel. - One runner per tenant executes the generated SQL against that tenant's DB (filling in
hasChat,numberOfAttachmentsfrom live counts).
Cleanup (Services/CleanupService.cs)
Scans for rooms that were assigned (assignedOn != null, eventId > 0) but never saw a matching conference, and either processes or clears them:
update virtualMeetingRooms set assignedOn = null, eventId = 0 ...for stale rooms.- Triggered manually via
POST /api/Cleanup/scan?environment=...and periodically by the processor. Tracks counters in the sharedProcessingStatus.