docker/mod/core/bbb-playback-presentation/recorder-monitor.py

21 lines
705 B
Python
Raw Normal View History

2020-06-12 02:49:13 +02:00
#!/usr/bin/env python3
2020-06-12 02:15:55 +02:00
import os
import argparse
import subprocess
import glob
PATH_MONITOR = "/var/bigbluebutton/recording/status/"
def file_monitor(event_to_check):
done_files = glob.glob(PATH_MONITOR + event_to_check + "/*.done") # List
while len(done_files) == 0:
os.sleep(5)
subprocess.Popen("/usr/local/bigbluebutton/scripts/rap-"+event_to_check+"-worker.rb", cwd="/usr/local/bigbluebutton/core/scripts")
if __name__ == "__main__":
parser = argparse.ArgumentParser()
2020-06-12 02:57:58 +02:00
parser.add_argument("--event", type=str, dest="event_to_check", help="Event to check (archive, events, process, publish, sanity)")
2020-06-12 02:15:55 +02:00
args = parser.parse_args()
file_monitor(args.event_to_check)