上传新的坐标文件前删除云端上原有的坐标
This commit is contained in:
1 parent
fb2ec3f5e6
commit
80900b6a9a
1 file changed
+7
-1
+7
-1
@@ -9,7 +9,13 @@ import config, libs, libs_db
|
|||||||
|
|
||||||
def upload_xmp(pid):
|
def upload_xmp(pid):
|
||||||
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} 上传xmp文件之前先删除oss上的xmp文件所在目录...')
|
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} 上传xmp文件之前先删除oss上的xmp文件所在目录...')
|
||||||
config.oss_bucket.delete_object(f'xmps/{pid}/')
|
|
||||||
|
#移除掉旧的文件夹
|
||||||
|
#config.oss_bucket.delete_object(f'xmps/{pid}/')
|
||||||
|
#删除oss 上的文件夹里的内容
|
||||||
|
object_list = oss2.ObjectIterator(config.oss_bucket, prefix=f'xmps/{pid}/')
|
||||||
|
config.oss_bucket.batch_delete_objects([obj.key for obj in object_list])
|
||||||
|
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
workdir = os.path.join(config.workdir, pid)
|
workdir = os.path.join(config.workdir, pid)
|
||||||
psid = libs.getPSid(pid)
|
psid = libs.getPSid(pid)
|
||||||
|
|||||||
Reference in new issue
Block a user