加点小延迟
This commit is contained in:
parent
53bda4d853
commit
65be98f6b8
2
api.py
2
api.py
@ -236,7 +236,7 @@ class XiGuaLiveApi:
|
|||||||
更新房间信息
|
更新房间信息
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
if not force and self._updRoomAt > (datetime.now() - timedelta(minutes=2)):
|
if not force and self._updRoomAt > (datetime.now() - timedelta(minutes=3)):
|
||||||
return self.isLive
|
return self.isLive
|
||||||
self._updRoomAt = datetime.now()
|
self._updRoomAt = datetime.now()
|
||||||
if self.isLive:
|
if self.isLive:
|
||||||
|
@ -8,7 +8,6 @@ import os
|
|||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def download():
|
def download():
|
||||||
session = requests.session()
|
session = requests.session()
|
||||||
while Common.api.isLive and not Common.forceNotDownload:
|
while Common.api.isLive and not Common.forceNotDownload:
|
||||||
@ -126,9 +125,9 @@ def run():
|
|||||||
Common.api.updRoomInfo()
|
Common.api.updRoomInfo()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
Common.appendError(e.__str__())
|
Common.appendError(e.__str__())
|
||||||
time.sleep(5)
|
time.sleep(2)
|
||||||
continue
|
continue
|
||||||
time.sleep(1)
|
time.sleep(0.5)
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
Common.api.updRoomInfo()
|
Common.api.updRoomInfo()
|
||||||
@ -145,4 +144,6 @@ def run():
|
|||||||
Common.forceStartUploadThread = False
|
Common.forceStartUploadThread = False
|
||||||
if Common.doDelay():
|
if Common.doDelay():
|
||||||
Common.uploadQueue.put(True)
|
Common.uploadQueue.put(True)
|
||||||
|
isEncode = True
|
||||||
|
isUpload = True
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
Reference in New Issue
Block a user