fix recording delete not sending notification

This commit is contained in:
Zachary Chai
2017-02-28 10:38:57 -05:00
parent 059a56e5a6
commit a72656465b
3 changed files with 11 additions and 23 deletions

View File

@ -20,25 +20,12 @@ class RecordingDeletesJob < ApplicationJob
queue_as :default
def perform(room, record_id, meeting=nil)
tries = 0
sleep_time = 2
while tries < 4
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
sleep_time = sleep_time * 2
tries += 1
end
full_id = "#{room}-#{meeting}"
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
end
end