进程断开后,立即更新房间信息
This commit is contained in:
parent
6cbaa384dc
commit
4c25ea3410
@ -160,11 +160,13 @@ if __name__ == "__main__":
|
|||||||
if d is None:
|
if d is None:
|
||||||
d = datetime.strftime(datetime.now(), "%Y_%m_%d")
|
d = datetime.strftime(datetime.now(), "%Y_%m_%d")
|
||||||
if not t.is_alive():
|
if not t.is_alive():
|
||||||
|
_count = 0
|
||||||
_preT = api.playlist
|
_preT = api.playlist
|
||||||
t = threading.Thread(target=download, args=(_preT,))
|
t = threading.Thread(target=download, args=(_preT,))
|
||||||
t.setDaemon(True)
|
t.setDaemon(True)
|
||||||
t.start()
|
t.start()
|
||||||
if not ut.is_alive():
|
if not ut.is_alive():
|
||||||
|
_count = 0
|
||||||
ut = threading.Thread(target=upload, args=(d,))
|
ut = threading.Thread(target=upload, args=(d,))
|
||||||
ut.setDaemon(True)
|
ut.setDaemon(True)
|
||||||
ut.start()
|
ut.start()
|
||||||
@ -172,7 +174,8 @@ if __name__ == "__main__":
|
|||||||
try:
|
try:
|
||||||
api.updRoomInfo()
|
api.updRoomInfo()
|
||||||
_count = 0
|
_count = 0
|
||||||
except:
|
except Exception as e:
|
||||||
|
print(e.__str__())
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
_count += 1
|
_count += 1
|
||||||
continue
|
continue
|
||||||
|
Reference in New Issue
Block a user