add recording events to other meeting pages under room

This commit is contained in:
Zachary Chai
2017-01-31 15:06:04 -05:00
parent 02f59c49e6
commit 77fd74dd8f
5 changed files with 40 additions and 16 deletions

View File

@ -19,16 +19,21 @@ class RecordingDeletesJob < ApplicationJob
queue_as :default
def perform(room, record_id)
def perform(room, record_id, meeting=nil)
tries = 0
sleep_time = 2
while tries < 4
bbb_res = bbb_get_recordings(nil, record_id)
bbb_res = bbb_get_recordings({recordID: record_id})
if !bbb_res[:recordings] || bbb_res[:messageKey] == 'noRecordings'
full_id = room
full_id += "-#{recording[:metadata][:"meeting-name"]}"
ActionCable.server.broadcast "#{room}_recording_updates_channel",
action: 'delete',
id: record_id
ActionCable.server.broadcast "#{full_id}_recording_updates_channel",
action: 'delete',
id: record_id
break
end
sleep sleep_time

View File

@ -19,13 +19,20 @@ class RecordingUpdatesJob < ApplicationJob
queue_as :default
def perform(room, record_id)
bbb_res = bbb_get_recordings(nil, record_id)
def perform(room, record_id, meeting=nil)
bbb_res = bbb_get_recordings({recordID: record_id})
recording = bbb_res[:recordings].first
full_id = room
full_id += "-#{recording[:metadata][:"meeting-name"]}"
ActionCable.server.broadcast "#{room}_recording_updates_channel",
action: 'update',
id: record_id,
published: recording[:published],
listed: bbb_is_recording_listed(recording)
ActionCable.server.broadcast "#{full_id}_recording_updates_channel",
action: 'update',
id: record_id,
published: recording[:published],
listed: bbb_is_recording_listed(recording)
end
end