add missing monitor recording file

This commit is contained in:
Sofyan Sugianto 2020-06-12 07:15:55 +07:00
parent 1800ce0cf8
commit cad5652e65
2 changed files with 21 additions and 0 deletions

View File

@ -67,6 +67,7 @@ COPY bbb-fsesl-akka/application.conf /etc/bbb-fsesl-akka/application.conf
COPY bbb-transcode-akka/application.conf /etc/bbb-transcode-akka/application.conf
COPY web-run.sh /usr/share/bbb-web/run-prod.sh
COPY bbb-playback-presentation/presentation.yml /usr/local/bigbluebutton/core/scripts/
COPY bbb-playback-presentation/recorder-monitor.py /usr/local/bin
RUN mkdir -p /usr/src/bbb-playback-presentation && cp -r /var/bigbluebutton/playback /usr/src/bbb-src-playback
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf

View File

@ -0,0 +1,20 @@
# /usr/bin/env python3
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()
parser.add_argument("--event", type=str, dest=event_to_check, help="Event to check (archive, events, process, publish, sanity)")
args = parser.parse_args()
file_monitor(args.event_to_check)