multi meeting rooms

This commit is contained in:
Zachary Chai
2017-01-27 15:44:24 -05:00
parent 0ce2a226a7
commit d67663fbf1
17 changed files with 123 additions and 66 deletions

View File

@ -19,15 +19,15 @@ class EndMeetingJob < ApplicationJob
queue_as :default
def perform(room)
def perform(room, meeting)
tries = 0
sleep_time = 2
while tries < 4
bbb_res = bbb_get_meeting_info(room)
bbb_res = bbb_get_meeting_info("#{room}-#{meeting}")
if !bbb_res[:returncode]
ActionCable.server.broadcast "#{room}_meeting_updates_channel",
ActionCable.server.broadcast "#{room}-#{meeting}_meeting_updates_channel",
action: 'meeting_ended'
break
end

View File

@ -17,8 +17,8 @@
class JoinMeetingJob < ApplicationJob
queue_as :default
def perform(room)
ActionCable.server.broadcast "#{room}_meeting_updates_channel",
def perform(room, meeting)
ActionCable.server.broadcast "#{room}-#{meeting}_meeting_updates_channel",
action: 'moderator_joined',
moderator: 'joined'
end

View File

@ -17,8 +17,8 @@
class NotifyUserWaitingJob < ApplicationJob
queue_as :default
def perform(room, user)
ActionCable.server.broadcast "#{room}_meeting_updates_channel",
def perform(room, meeting, user)
ActionCable.server.broadcast "#{room}-#{meeting}_meeting_updates_channel",
{ action: 'user_waiting', user: user }
end
end