code changes to allow for meetings' redis events to be processed on different html5 nodejs pids
This commit is contained in:
parent
6b4710e349
commit
23f2df11d5
@ -92,7 +92,7 @@ class IntlStartup extends Component {
|
||||
}
|
||||
|
||||
fetchLocalizedMessages(locale, init = false) {
|
||||
const url = `/html5client/locale?locale=${locale}&init=${init}`;
|
||||
const url = `./locale?locale=${locale}&init=${init}`;
|
||||
|
||||
this.setState({ fetching: true }, () => {
|
||||
fetch(url)
|
||||
|
@ -108,6 +108,9 @@ class RedisPubSub {
|
||||
this.didSendRequestEvent = false;
|
||||
const host = process.env.REDIS_HOST || Meteor.settings.private.redis.host;
|
||||
const redisConf = Meteor.settings.private.redis;
|
||||
this.instanceMax = parseInt(process.env.INSTANCE_MAX || "1");
|
||||
this.instanceId = process.env.INSTANCE_ID || "1";
|
||||
|
||||
const { password, port } = redisConf;
|
||||
|
||||
if (password) {
|
||||
@ -122,6 +125,7 @@ class RedisPubSub {
|
||||
|
||||
this.emitter = new EventEmitter2();
|
||||
this.mettingsQueues = {};
|
||||
this.mettingsQueues[NO_MEETING_ID] = new MeetingMessageQueue(this.emitter, this.config.async, this.config.debug);
|
||||
|
||||
this.handleSubscribe = this.handleSubscribe.bind(this);
|
||||
this.handleMessage = this.handleMessage.bind(this);
|
||||
@ -180,16 +184,33 @@ class RedisPubSub {
|
||||
|
||||
const queueId = meetingId || NO_MEETING_ID;
|
||||
|
||||
if (!(queueId in this.mettingsQueues)) {
|
||||
this.mettingsQueues[meetingId] = new MeetingMessageQueue(this.emitter, async, this.debug);
|
||||
if (eventName === 'MeetingCreatedEvtMsg'){
|
||||
const newIntId = parsedMessage.core.body.props.meetingProp.intId;
|
||||
const metadata = parsedMessage.core.body.props.metadataProp.metadata;
|
||||
const instanceId = metadata['bbb-meetinginstance'];
|
||||
|
||||
Logger.info("MeetingCreatedEvtMsg received with meetingInstance: " + instanceId + " -- this is instance: " + this.instanceId);
|
||||
|
||||
if (instanceId === this.instanceId){
|
||||
this.mettingsQueues[newIntId] = new MeetingMessageQueue(this.emitter, async, this.debug);
|
||||
} else {
|
||||
// Logger.error('THIS NODEJS IS **NOT** PROCESSING EVENTS FOR THIS MEETING')
|
||||
}
|
||||
}
|
||||
|
||||
this.mettingsQueues[meetingId].add({
|
||||
pattern,
|
||||
channel,
|
||||
eventName,
|
||||
parsedMessage,
|
||||
});
|
||||
if (queueId in this.mettingsQueues) {
|
||||
this.mettingsQueues[queueId].add({
|
||||
pattern,
|
||||
channel,
|
||||
eventName,
|
||||
parsedMessage,
|
||||
});
|
||||
}
|
||||
//else {
|
||||
//Logger.info("Skipping redis message for " + queueId);
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
|
||||
destroyMeetingQueue(id) {
|
||||
@ -258,3 +279,4 @@ Meteor.startup(() => {
|
||||
});
|
||||
|
||||
export default RedisPubSubSingleton;
|
||||
|
||||
|
@ -78,7 +78,7 @@ export default class Legacy extends Component {
|
||||
|| navigator.language
|
||||
|| Meteor.settings.public.app.defaultSettings.application.fallbackLocale;
|
||||
|
||||
const url = `/html5client/locale?locale=${locale}`;
|
||||
const url = `./locale?locale=${locale}`;
|
||||
|
||||
const that = this;
|
||||
this.state = { viewState: FETCHING };
|
||||
|
@ -159,7 +159,7 @@ class MeetingEnded extends PureComponent {
|
||||
comment: MeetingEnded.getComment(),
|
||||
userRole: this.localUserRole,
|
||||
};
|
||||
const url = '/html5client/feedback';
|
||||
const url = './feedback';
|
||||
const options = {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(message),
|
||||
|
@ -27,7 +27,7 @@ const updateSettings = (obj, msg) => {
|
||||
}
|
||||
};
|
||||
|
||||
const getAvailableLocales = () => fetch('/html5client/locales').then(locales => locales.json());
|
||||
const getAvailableLocales = () => fetch('./locales').then(locales => locales.json());
|
||||
|
||||
export {
|
||||
getUserRoles,
|
||||
|
@ -258,7 +258,7 @@ moderatorsJoinViaHTML5Client=true
|
||||
|
||||
# The url of the BigBlueButton HTML5 client. Users will be redirected here when
|
||||
# successfully joining the meeting.
|
||||
html5ClientUrl=${bigbluebutton.web.serverURL}/html5client/join
|
||||
html5ClientUrl=${bigbluebutton.web.serverURL}/html5client/%%INSTANCEID%%/join
|
||||
|
||||
|
||||
# The url for where the guest will poll if approved to join or not.
|
||||
|
@ -510,6 +510,11 @@ class ApiController {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
String meetingInstance = meeting.getMetadata()["bbb-meetinginstance"];
|
||||
meetingInstance = (meetingInstance == null) ? "1" : meetingInstance;
|
||||
clientURL = clientURL.replaceAll("%%INSTANCEID%%", meetingInstance);
|
||||
|
||||
if (!StringUtils.isEmpty(params.redirect)) {
|
||||
try {
|
||||
redirectClient = Boolean.parseBoolean(params.redirect);
|
||||
|
Loading…
Reference in New Issue
Block a user