- archive only new recordings
This commit is contained in:
parent
d5eaaee2b7
commit
87a53dce50
@ -4,9 +4,6 @@ require 'trollop'
|
||||
require 'yaml'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def archive_audio(meeting_id, audio_dir, raw_archive_dir)
|
||||
BigBlueButton.logger.info("Archiving audio #{audio_dir}/#{meeting_id}*.wav.")
|
||||
begin
|
||||
@ -86,16 +83,19 @@ done_files.each do |df|
|
||||
meeting_id = match[1]
|
||||
|
||||
target_dir = "#{raw_archive_dir}/#{meeting_id}"
|
||||
if FileTest.directory?(target_dir)
|
||||
FileUtils.remove_dir target_dir
|
||||
if not FileTest.directory?(target_dir)
|
||||
FileUtils.mkdir_p target_dir
|
||||
archive_events(meeting_id, redis_host, redis_port, raw_archive_dir)
|
||||
archive_audio(meeting_id, audio_dir, raw_archive_dir)
|
||||
archive_presentation(meeting_id, presentation_dir, raw_archive_dir)
|
||||
archive_deskshare(meeting_id, deskshare_dir, raw_archive_dir)
|
||||
archive_video(meeting_id, video_dir, raw_archive_dir)
|
||||
archive_done = File.new("#{recording_dir}/status/archived/#{meeting_id}.done", "w")
|
||||
archive_done.write("Archived #{meeting_id}")
|
||||
archive_done.close
|
||||
else
|
||||
BigBlueButton.logger.debug("Skipping #{meeting_id} as it has already been archived.")
|
||||
end
|
||||
FileUtils.mkdir_p target_dir
|
||||
|
||||
archive_events(meeting_id, redis_host, redis_port, raw_archive_dir)
|
||||
archive_audio(meeting_id, audio_dir, raw_archive_dir)
|
||||
archive_presentation(meeting_id, presentation_dir, raw_archive_dir)
|
||||
archive_deskshare(meeting_id, deskshare_dir, raw_archive_dir)
|
||||
archive_video(meeting_id, video_dir, raw_archive_dir)
|
||||
end
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user