more testing and code cleanup and enable coverage reports on circle

This commit is contained in:
Zachary Chai
2017-03-03 15:26:07 -05:00
parent bee42c8148
commit 7c86aa8e7f
9 changed files with 33 additions and 40 deletions

View File

@ -15,27 +15,10 @@
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
class EndMeetingJob < ApplicationJob
include BbbApi
queue_as :default
def perform(room, meeting)
tries = 0
sleep_time = 2
while tries < 4
bbb_res = bbb_get_meeting_info("#{room}-#{meeting}")
if !bbb_res[:returncode]
ActionCable.server.broadcast "#{room}-#{meeting}_meeting_updates_channel",
action: 'meeting_ended'
break
end
sleep sleep_time
sleep_time = sleep_time * 2
tries += 1
end
ActionCable.server.broadcast "#{room}-#{meeting}_meeting_updates_channel",
action: 'meeting_ended'
end
end

View File

@ -15,12 +15,10 @@
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
class RecordingDeletesJob < ApplicationJob
include BbbApi
queue_as :default
def perform(room, record_id, meeting=nil)
full_id = "#{room}-#{meeting}"
def perform(room, record_id, meeting_name)
full_id = "#{room}-#{meeting_name}"
ActionCable.server.broadcast "#{room}_recording_updates_channel",
action: 'delete',
id: record_id

View File

@ -19,11 +19,9 @@ class RecordingUpdatesJob < ApplicationJob
queue_as :default
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"]}"
def perform(room, record_id)
recording = bbb_get_recordings({recordID: record_id})[:recordings].first
full_id = "#{room}-#{recording[:metadata][:"meeting-name"]}"
ActionCable.server.broadcast "#{room}_recording_updates_channel",
action: 'update',
id: record_id,