openvidu-server: change sessionCreated CDR event timing

pull/630/head
pabloFuente 2021-06-07 13:09:40 +02:00
parent 103f122c18
commit 9b1663f1c8
3 changed files with 5 additions and 4 deletions

View File

@ -303,8 +303,10 @@ public abstract class SessionManager {
} }
public Session storeSessionNotActive(String sessionId, SessionProperties sessionProperties) { public Session storeSessionNotActive(String sessionId, SessionProperties sessionProperties) {
Session sessionNotActive = new Session(sessionId, sessionProperties, openviduConfig, recordingManager); Session sessionNotActive = this
return this.storeSessionNotActive(sessionNotActive); .storeSessionNotActive(new Session(sessionId, sessionProperties, openviduConfig, recordingManager));
sessionEventsHandler.onSessionCreated(sessionNotActive);
return sessionNotActive;
} }
public Session storeSessionNotActive(Session sessionNotActive) { public Session storeSessionNotActive(Session sessionNotActive) {

View File

@ -777,7 +777,6 @@ public class KurentoSessionManager extends SessionManager {
log.info("No session '{}' exists yet. Created one on KMS '{}' with ip '{}'", session.getSessionId(), log.info("No session '{}' exists yet. Created one on KMS '{}' with ip '{}'", session.getSessionId(),
kms.getId(), kms.getIp()); kms.getId(), kms.getIp());
sessionEventsHandler.onSessionCreated(session);
return session; return session;
} }

View File

@ -121,7 +121,7 @@ public class SessionRestController {
} }
Session sessionNotActive = sessionManager.storeSessionNotActive(sessionId, sessionProperties); Session sessionNotActive = sessionManager.storeSessionNotActive(sessionId, sessionProperties);
log.info("New session {} initialized {}", sessionId, this.sessionManager.getSessionsWithNotActive().stream() log.info("New session {} created {}", sessionId, this.sessionManager.getSessionsWithNotActive().stream()
.map(Session::getSessionId).collect(Collectors.toList()).toString()); .map(Session::getSessionId).collect(Collectors.toList()).toString());
return new ResponseEntity<>(sessionNotActive.toJson(false, false).toString(), RestUtils.getResponseHeaders(), return new ResponseEntity<>(sessionNotActive.toJson(false, false).toString(), RestUtils.getResponseHeaders(),