review feedback

This commit is contained in:
mertalev
2026-05-07 18:33:23 -04:00
parent 4ec06aaa38
commit 1b8a5f3307
3 changed files with 9 additions and 3 deletions
@@ -81,6 +81,7 @@ export class TranscodingService extends BaseService {
this.cleanupInterval ??= setInterval(() => void this.removeInactiveSessions(), HLS_CLEANUP_INTERVAL_MS);
this.websocketRepository.serverSend('HlsSessionResult', { sessionId });
} catch (error) {
// If insertion failed due to a PK constraint, another worker has already created a session for this ID.
if (!isVideoStreamSessionPkConstraint(error)) {
this.logger.error(`Failed to create HLS session ${sessionId}: ${error}`);
this.websocketRepository.serverSend('HlsSessionResult', { sessionId, error: 'Failed to create HLS session' });