Class: BigbluebuttonMeetingUpdater
- Inherits:
-
Object
- Object
- BigbluebuttonMeetingUpdater
- Defined in:
- app/workers/bigbluebutton_meeting_updater.rb
Overview
A resque worker to get information about a meeting with ‘getMeetingInfo` and update the associated `BigbluebuttonMeeting` object. This should be called to speed up the update of a meeting object (usually on creates and ends).
Class Method Summary collapse
Class Method Details
.perform(room_id, wait = nil) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/workers/bigbluebutton_meeting_updater.rb', line 7 def self.perform(room_id, wait=nil) Rails.logger.info "BigbluebuttonMeetingUpdater worker: waiting #{wait} for room #{room_id}" sleep(wait) unless wait.nil? room = BigbluebuttonRoom.find(room_id) if room.nil? Rails.logger.info "BigbluebuttonMeetingUpdater worker: room #{room_id} not found!" else # `fetch_meeting_info` will automatically update the meeting by # calling `room.update_current_meeting_record` room.fetch_meeting_info end Rails.logger.flush # note: don't need to keep trying because there's a worker that runs periodically # for each meeting that still hasn't ended end |