Skip the 'ser' repair if there are no webcam videos

This was causing the sanity check to fail.
This commit is contained in:
Calvin Walton 2015-01-30 10:11:44 -05:00 committed by Felipe Cecagno
parent 34b13eb807
commit e1e2d78e50

View File

@ -54,12 +54,14 @@ def check_webcam_files(raw_dir, meeting_id)
BigBlueButton.logger.info("Repairing red5 serialized streams") BigBlueButton.logger.info("Repairing red5 serialized streams")
cp="/usr/share/red5/red5-server.jar:/usr/share/red5/lib/*" cp="/usr/share/red5/red5-server.jar:/usr/share/red5/lib/*"
FileUtils.cd("#{meeting_dir}/video/#{meeting_id}") do if File.directory?("#{meeting_dir}/video/#{meeting_id}")
Dir.glob("*.flv.ser").each do |ser| FileUtils.cd("#{meeting_dir}/video/#{meeting_id}") do
BigBlueButton.logger.info("Repairing #{ser}") Dir.glob("*.flv.ser").each do |ser|
ret = BigBlueButton.exec_ret('java', '-cp', cp, 'org.red5.io.flv.impl.FLVWriter', ser, '0', '7') BigBlueButton.logger.info("Repairing #{ser}")
if ret != 0 ret = BigBlueButton.exec_ret('java', '-cp', cp, 'org.red5.io.flv.impl.FLVWriter', ser, '0', '7')
BigBlueButton.logger.warn("Failed to repair #{ser}") if ret != 0
BigBlueButton.logger.warn("Failed to repair #{ser}")
end
end end
end end
end end