避免编码进程出错退出导致无法继续进行上传

This commit is contained in:
Jerry Yan 2019-03-21 21:16:08 +08:00 committed by JerryYan
parent 5ee60d3dc7
commit c89f84a44f

View File

@ -1,3 +1,4 @@
import shutil
import sys import sys
import time import time
from datetime import datetime from datetime import datetime
@ -170,6 +171,10 @@ if __name__ == "__main__":
ut = threading.Thread(target=upload, args=(d,)) ut = threading.Thread(target=upload, args=(d,))
ut.setDaemon(True) ut.setDaemon(True)
ut.start() ut.start()
if not et.is_alive():
et = threading.Thread(target=encode, args=())
et.setDaemon(True)
et.start()
if _count % 6 == 0: if _count % 6 == 0:
try: try:
api.updRoomInfo() api.updRoomInfo()