mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: decouple recording stopped ws notification and CD/webhook message
parent
bd54e77f08
commit
cc934b5d71
|
@ -439,8 +439,6 @@ public class SessionEventsHandler {
|
|||
|
||||
public void sendRecordingStoppedNotification(Session session, Recording recording, EndReason reason) {
|
||||
|
||||
CDR.recordRecordingStopped(session.getSessionId(), recording, reason);
|
||||
|
||||
// Be sure to clean this map (this should return null)
|
||||
this.recordingsStarted.remove(session.getSessionId());
|
||||
|
||||
|
|
|
@ -328,6 +328,9 @@ public class ComposedRecordingService extends RecordingService {
|
|||
throw new OpenViduException(Code.RECORDING_REPORT_ERROR_CODE,
|
||||
"There was an error generating the metadata report file for the recording");
|
||||
}
|
||||
|
||||
this.cdr.recordRecordingStopped(recording.getSessionId(), recording, reason);
|
||||
|
||||
if (session != null && reason != null) {
|
||||
this.recordingManager.sessionHandler.sendRecordingStoppedNotification(session, recording, reason);
|
||||
}
|
||||
|
@ -380,8 +383,9 @@ public class ComposedRecordingService extends RecordingService {
|
|||
long finalSize = videoFile.length();
|
||||
double finalDuration = (double) compositeWrapper.getDuration() / 1000;
|
||||
this.updateFilePermissions(filesPath);
|
||||
this.sealRecordingMetadataFileAsStopped(recording, finalSize, finalDuration,
|
||||
finalRecordingArray[0] = this.sealRecordingMetadataFileAsStopped(recording, finalSize, finalDuration,
|
||||
filesPath + RecordingManager.RECORDING_ENTITY_FILE + recording.getId());
|
||||
cdr.recordRecordingStopped(finalRecordingArray[0].getSessionId(), finalRecordingArray[0], reason);
|
||||
});
|
||||
} catch (IOException e) {
|
||||
log.error("Error while downloading recording {}: {}", recording.getName(), e.getMessage());
|
||||
|
|
|
@ -171,6 +171,7 @@ public class SingleStreamRecordingService extends RecordingService {
|
|||
}
|
||||
}
|
||||
finalRecordingArray[0] = this.sealMetadataFiles(recording);
|
||||
cdr.recordRecordingStopped(finalRecordingArray[0].getSessionId(), finalRecordingArray[0], reason);
|
||||
});
|
||||
} catch (IOException e) {
|
||||
log.error("Error while downloading recording {}", recording.getName());
|
||||
|
|
Loading…
Reference in New Issue