edgeUpdate
This commit is contained in:
@ -14,17 +14,17 @@ obsClient = ObsClient(
|
||||
bucketName = 'ieemoo-ai'
|
||||
|
||||
def AddObs(file_path, status):
|
||||
with lock:
|
||||
if not cfg.flag:
|
||||
#with lock:
|
||||
if not cfg.flag:
|
||||
addobs(file_path, status)
|
||||
#os.remove(file_path)
|
||||
else:
|
||||
if status == '02':
|
||||
addobs(file_path, status)
|
||||
#os.remove(file_path)
|
||||
else:
|
||||
if status == '02':
|
||||
addobs(file_path, status)
|
||||
else:
|
||||
objectkey = os.path.basename(file_path)
|
||||
f_dist = os.sep.join([cfg.tempvideos, status+'_'+objectkey])
|
||||
shutil.move(file_path, f_dst)
|
||||
objectkey = os.path.basename(file_path)
|
||||
f_dist = os.sep.join([cfg.tempvideos, status+'_'+objectkey])
|
||||
shutil.move(file_path, f_dst)
|
||||
|
||||
def addobs(file_path, status): #save videos
|
||||
ti.sleep(1)
|
||||
@ -34,7 +34,7 @@ def addobs(file_path, status): #save videos
|
||||
resp = requests.post(url=vre, data=json_data)
|
||||
status = resp.json()
|
||||
if not 'data' in status:#延迟设置
|
||||
ti.sleep(2)
|
||||
ti.sleep(1)
|
||||
resp = requests.post(url=vre, data=json_data)
|
||||
status = resp.json()
|
||||
if 'data' in status:
|
||||
|
Reference in New Issue
Block a user