- run post events scripts
This commit is contained in:
parent
61d9223a70
commit
40c6dd8827
@ -23,6 +23,23 @@ require 'rubygems'
|
||||
require 'yaml'
|
||||
require 'fileutils'
|
||||
|
||||
def run_post_events_script(meeting_id)
|
||||
Dir.glob("post_events/*.rb").sort.each do |post_event_script|
|
||||
match = /([^\/]*).rb$/.match(post_event_script)
|
||||
post_type = match[1]
|
||||
BigBlueButton.logger.info("Running post event script #{post_type}")
|
||||
|
||||
step_start_time = BigBlueButton.monotonic_clock
|
||||
ret = BigBlueButton.exec_ret("ruby", post_event_script, "-m", meeting_id)
|
||||
step_stop_time = BigBlueButton.monotonic_clock
|
||||
step_time = step_stop_time - step_start_time
|
||||
step_succeeded = (ret == 0)
|
||||
|
||||
if not step_succeeded
|
||||
BigBlueButton.logger.warn("Post event script #{post_event_script} failed")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def keep_events_from_non_recorded_meeting(recording_dir, ended_done_file)
|
||||
ended_done_base = File.basename(ended_done_file, '.done')
|
||||
@ -43,6 +60,10 @@ def keep_events_from_non_recorded_meeting(recording_dir, ended_done_file)
|
||||
ret = BigBlueButton.exec_ret("ruby", "events/events.rb", "-m", meeting_id, '-b', break_timestamp)
|
||||
else
|
||||
ret = BigBlueButton.exec_ret("ruby", "events/events.rb", "-m", meeting_id)
|
||||
|
||||
# Need to only run post events scripts after meeting ends not during
|
||||
# segments.
|
||||
run_post_events_script(meeting_id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user