Add log info to BigBlueButton.execute : exitstatus, succeed? , exited?
Change IO.popen to BigBlueButton.execute in /core/scripts/rap-worker.rb (2)
This commit is contained in:
parent
1c45591583
commit
b247c749a8
@ -47,15 +47,19 @@ module BigBlueButton
|
||||
output=""
|
||||
status = Open4::popen4(command) do | pid, stdin, stdout, stderr|
|
||||
BigBlueButton.logger.info("Executing: #{command}")
|
||||
|
||||
output = stdout.readlines
|
||||
BigBlueButton.logger.info( "Output: #{output} ") unless output.empty?
|
||||
|
||||
errors = stderr.readlines
|
||||
unless errors.empty?
|
||||
BigBlueButton.logger.error( "Error: stderr: #{errors}")
|
||||
raise errors.to_s
|
||||
end
|
||||
end
|
||||
BigBlueButton.logger.info("Process Status: #{status}")
|
||||
BigBlueButton.logger.info("Success ?: #{status.success?}")
|
||||
BigBlueButton.logger.info("Process exited? #{status.exited?}")
|
||||
BigBlueButton.logger.info("Exit status: #{status.exitstatus}")
|
||||
output
|
||||
end
|
||||
end
|
||||
|
@ -18,9 +18,12 @@ def process_archived_meeting(recording_dir)
|
||||
# This script must be invoked from the scripts directory for the PATH to be resolved.
|
||||
Dir.glob("#{Dir.pwd}/process/*.rb").sort.each do |file|
|
||||
# BigBlueButton.logger.info("Executing #{file}\n")
|
||||
IO.popen("ruby #{file} -m #{meeting_id}")
|
||||
Process.wait
|
||||
puts "********** #{$?.exitstatus} #{$?.exited?} #{$?.success?}********************"
|
||||
#IO.popen("ruby #{file} -m #{meeting_id}")
|
||||
#Process.wait
|
||||
#puts "********** #{$?.exitstatus} #{$?.exited?} #{$?.success?}********************"
|
||||
command = "ruby #{file} -m #{meeting_id}"
|
||||
BigBlueButton.execute(command)
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -36,9 +39,12 @@ def publish_processed_meeting(recording_dir)
|
||||
# This script must be invoked from the scripts directory for the PATH to be resolved.
|
||||
Dir.glob("#{Dir.pwd}/publish/*.rb").sort.each do |file|
|
||||
# BigBlueButton.logger.info("Executing #{file}\n")
|
||||
IO.popen("ruby #{file} -m #{meeting_id}")
|
||||
Process.wait
|
||||
puts "********** #{$?.exitstatus} #{$?.exited?} #{$?.success?}********************"
|
||||
#IO.popen("ruby #{file} -m #{meeting_id}")
|
||||
#Process.wait
|
||||
#puts "********** #{$?.exitstatus} #{$?.exited?} #{$?.success?}********************"
|
||||
command = "ruby #{file} -m #{meeting_id}"
|
||||
BigBlueButton.execute(command)
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user