mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: environmentId on mediaServerCrashed
parent
c98276a196
commit
b55072b394
|
@ -7,16 +7,22 @@ import io.openvidu.server.kurento.kms.Kms;
|
|||
public class CDREventMediaServerCrashed extends CDREvent {
|
||||
|
||||
private Kms kms;
|
||||
private String environmentId;
|
||||
|
||||
public CDREventMediaServerCrashed(CDREventName eventName, String sessionId, Long timeStamp, Kms kms) {
|
||||
public CDREventMediaServerCrashed(CDREventName eventName, String sessionId, Long timeStamp, Kms kms,
|
||||
String environmentId) {
|
||||
super(eventName, sessionId, timeStamp);
|
||||
this.kms = kms;
|
||||
this.environmentId = environmentId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonObject toJson() {
|
||||
JsonObject json = super.toJson();
|
||||
json.addProperty("id", this.kms.getId());
|
||||
if (this.environmentId != null) {
|
||||
json.addProperty("environmentId", this.environmentId);
|
||||
}
|
||||
json.addProperty("ip", this.kms.getIp());
|
||||
json.addProperty("uri", this.kms.getUri());
|
||||
return json;
|
||||
|
|
|
@ -217,9 +217,9 @@ public class CallDetailRecord {
|
|||
});
|
||||
}
|
||||
|
||||
public void recordMediaServerCrashed(Kms kms, long timeOfKurentoDisconnection) {
|
||||
public void recordMediaServerCrashed(Kms kms, String environmentId, long timeOfKurentoDisconnection) {
|
||||
CDREvent e = new CDREventMediaServerCrashed(CDREventName.mediaServerCrashed, null, timeOfKurentoDisconnection,
|
||||
kms);
|
||||
kms, environmentId);
|
||||
this.log(e);
|
||||
}
|
||||
|
||||
|
|
|
@ -608,7 +608,7 @@ public class SessionEventsHandler {
|
|||
}
|
||||
|
||||
public void onMediaServerCrashed(Kms kms, long timeOfKurentoDisconnection) {
|
||||
CDR.recordMediaServerCrashed(kms, timeOfKurentoDisconnection);
|
||||
CDR.recordMediaServerCrashed(kms, null, timeOfKurentoDisconnection);
|
||||
}
|
||||
|
||||
protected Set<Participant> filterParticipantsByRole(OpenViduRole[] roles, Set<Participant> participants) {
|
||||
|
|
Loading…
Reference in New Issue