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