|
@@ -193,10 +193,6 @@ class AiView(View):
|
|
|
n_time=n_time,i=i) # 封面图
|
|
|
thread_task = threading.Thread(target=self.upload_s3, args=(val, upload_path))
|
|
|
thread_task.start()
|
|
|
- #需要删除图片
|
|
|
- photo.close()
|
|
|
- self.del_path(dir_path)
|
|
|
- self.del_path(dir_path + '.jpg')
|
|
|
|
|
|
#存储消息以及推送
|
|
|
is_st = 3 #多图
|
|
@@ -281,6 +277,10 @@ class AiView(View):
|
|
|
except Exception as e:
|
|
|
logger.info("errLine={errLine}, errMsg={errMsg}".format(errLine=e.__traceback__.tb_lineno,errMsg=repr(e)))
|
|
|
continue
|
|
|
+ # 需要删除图片
|
|
|
+ photo.close()
|
|
|
+ self.del_path(dir_path)
|
|
|
+ self.del_path(dir_path + '.jpg')
|
|
|
Equipment_Info.objects.bulk_create(eq_list)
|
|
|
return response.json(0)
|
|
|
|