This commit is contained in:
2022-12-14 15:20:32 +08:00
parent 99e11485d3
commit ca311b2e71

View File

@ -17,6 +17,7 @@ def AddObs(file_path, status):
with lock: with lock:
if not cfg.flag: if not cfg.flag:
addobs(file_path, status) addobs(file_path, status)
os.remove(file_path)
else: else:
if status == '02': if status == '02':
addobs(file_path, status) addobs(file_path, status)
@ -49,7 +50,7 @@ def addobs(file_path, status): #save videos
if objectkey.split('.')[-1] in ['avi','mp4']: if objectkey.split('.')[-1] in ['avi','mp4']:
objectkey = 'videos/'+time+'/'+status+'/'+status+'_'+objectkey objectkey = 'videos/'+time+'/'+status+'/'+status+'_'+objectkey
resp = obsClient.putFile(bucketName, objectkey, file_path) resp = obsClient.putFile(bucketName, objectkey, file_path)
os.remove(file_path) #os.remove(file_path)
def Addimg(uuid_barcode): def Addimg(uuid_barcode):
time = uuid_barcode.split('-')[0].split('_')[-1] time = uuid_barcode.split('-')[0].split('_')[-1]