程序优化
This commit is contained in:
1 parent
2093ff5526
commit
10640a63c2
8 files changed
+260
-44
No files matched your search
+3
-1
@@ -183,9 +183,11 @@ def down_obj_from_oss(workdir, pid, action):
|
||||
prefix = f'objs/{action}/{pid}/'
|
||||
filelist = oss2.ObjectIteratorV2(config.oss_bucket, prefix=prefix)
|
||||
print('正在下载:', prefix)
|
||||
obj_filename = ""
|
||||
for file in filelist:
|
||||
filename = file.key.split('/')[-1]
|
||||
if filename.endswith('.obj'): obj_filename = filename
|
||||
if filename.endswith('.obj'):
|
||||
obj_filename = filename
|
||||
# print('正在下载:', file.key)
|
||||
localfile = os.path.join(workdir, action, pid, filename)
|
||||
config.oss_bucket.get_object_to_file(file.key, localfile)
|
||||
|
||||
Reference in new issue
Block a user