update
This commit is contained in:
Binary file not shown.
@ -26,22 +26,23 @@ def AddObs(file_path, status):
|
|||||||
shutil.move(file_path, f_dst)
|
shutil.move(file_path, f_dst)
|
||||||
|
|
||||||
def addobs(file_path, status): #save videos
|
def addobs(file_path, status): #save videos
|
||||||
ti.sleep(2)
|
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,
|
resp = requests.post(url=cfg.Vre,
|
||||||
data=json_data)
|
data=json_data)
|
||||||
#print('>>>>>>>>>',resp)
|
|
||||||
status = resp.json()
|
status = resp.json()
|
||||||
#print('>>>>>>>>>>>>>', json_data)
|
if not 'data' in status:#延迟设置
|
||||||
#print('>>>>>>>>>>>>>', status)
|
while num < 20:
|
||||||
try:
|
ti.sleep(2)
|
||||||
status = status['data']
|
num += 1
|
||||||
except Exception as e:
|
resp = requests.post(url=cfg.Vre, data=json_data)
|
||||||
ti.sleep(5)
|
status = resp.json()
|
||||||
resp = requests.post(url=cfg.Vre,data=json_data)
|
if not 'data' in status:
|
||||||
status = resp.json()
|
continue
|
||||||
status = status['data']
|
else:break
|
||||||
|
status = status['data']
|
||||||
|
|
||||||
objectkey = os.path.basename(file_path)
|
objectkey = os.path.basename(file_path)
|
||||||
time = os.path.basename(file_path).split('-')[0]
|
time = os.path.basename(file_path).split('-')[0]
|
||||||
|
Reference in New Issue
Block a user