update
This commit is contained in:
@ -27,21 +27,19 @@ def AddObs(file_path, status):
|
|||||||
|
|
||||||
def addobs(file_path, status): #save videos
|
def addobs(file_path, status): #save videos
|
||||||
ti.sleep(3)
|
ti.sleep(3)
|
||||||
num = 0
|
|
||||||
videoUuid = os.path.basename(file_path).split('_')[1]
|
videoUuid = os.path.basename(file_path).split('_')[1]
|
||||||
json_data = {'videoUuid': videoUuid}
|
json_data = {'videoUuid': videoUuid}
|
||||||
resp = requests.post(url=cfg.Vre,
|
for vre in [cfg.VreTest, cfg.VreTest2]:
|
||||||
data=json_data)
|
resp = requests.post(url=vre, data=json_data)
|
||||||
status = resp.json()
|
status = resp.json()
|
||||||
if not 'data' in status:#延迟设置
|
if not 'data' in status:#延迟设置
|
||||||
while num < 20:
|
ti.sleep(5)
|
||||||
ti.sleep(2)
|
|
||||||
num += 1
|
|
||||||
resp = requests.post(url=cfg.Vre, data=json_data)
|
resp = requests.post(url=cfg.Vre, data=json_data)
|
||||||
status = resp.json()
|
status = resp.json()
|
||||||
if not 'data' in status:
|
if 'data' in status:
|
||||||
continue
|
break
|
||||||
else:break
|
else:
|
||||||
|
break
|
||||||
status = status['data']
|
status = status['data']
|
||||||
|
|
||||||
objectkey = os.path.basename(file_path)
|
objectkey = os.path.basename(file_path)
|
||||||
|
Reference in New Issue
Block a user