fix time sleep error

This commit is contained in:
Sofyan Sugianto 2020-06-12 08:03:04 +07:00
parent e304bebe9c
commit 78a38656bb

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import os import time
import argparse import argparse
import subprocess import subprocess
import glob import glob
@ -10,7 +10,7 @@ PATH_MONITOR = "/var/bigbluebutton/recording/status/"
def file_monitor(event_to_check): def file_monitor(event_to_check):
done_files = glob.glob(PATH_MONITOR + event_to_check + "/*.done") # List done_files = glob.glob(PATH_MONITOR + event_to_check + "/*.done") # List
while len(done_files) == 0: while len(done_files) == 0:
os.sleep(5) time.sleep(5)
subprocess.Popen("/usr/local/bigbluebutton/scripts/rap-"+event_to_check+"-worker.rb", cwd="/usr/local/bigbluebutton/core/scripts") subprocess.Popen("/usr/local/bigbluebutton/scripts/rap-"+event_to_check+"-worker.rb", cwd="/usr/local/bigbluebutton/core/scripts")
if __name__ == "__main__": if __name__ == "__main__":