|
@@ -114,21 +114,11 @@ def merge(local_bags, merged_prefix, local_merged_dir, merged_bag_name):
|
|
|
logging.exception("bag包合并报错: %s" % str(e))
|
|
|
|
|
|
|
|
|
-'''
|
|
|
-cname:http://pji-bucket1.oss.icvdc.com
|
|
|
-内网endpoint: oss-cn-beijing-gqzl-d01-a.ops.gqzl-cloud.com
|
|
|
-keyid:n8glvFGS25MrLY7j
|
|
|
-secret:xZ2Fozoarpfw0z28FUhtg8cu0yDc5d
|
|
|
-oss桶名: pji-bucket1
|
|
|
-oss桶名: oss://pji-bucket1
|
|
|
-'''
|
|
|
# ------- 获取未合并的bag包,合并 -------
|
|
|
if __name__ == '__main__':
|
|
|
|
|
|
# 1 创建阿里云对象
|
|
|
auth = oss2.Auth('n8glvFGS25MrLY7j', 'xZ2Fozoarpfw0z28FUhtg8cu0yDc5d')
|
|
|
- # cname = 'http://open-bucket.oss.icvdc.com'
|
|
|
- # bucket = oss2.Bucket(auth, cname, 'open-bucket', is_cname=True)
|
|
|
endpoint = 'oss-cn-beijing-gqzl-d01-a.ops.gqzl-cloud.com'
|
|
|
bucket = oss2.Bucket(auth, endpoint, 'pji-bucket1')
|
|
|
while True:
|
|
@@ -144,8 +134,7 @@ if __name__ == '__main__':
|
|
|
if str(obj1.key).count('/') == 2: # pujin/robot-01/
|
|
|
# 6 校验bag包个数
|
|
|
for obj2 in oss2.ObjectIterator(bucket, prefix=str(obj1.key) + key2, delimiter='/'):
|
|
|
- if str(obj2.key).count(
|
|
|
- '/') == 4: # pujin/robot-01/data/2023-12-20-02-16-56_obstacledetection_10/
|
|
|
+ if str(obj2.key).count('/') == 4: # pujin/robot-01/data/2023-12-20-02-16-56_obstacledetection_10/
|
|
|
bag_need = str(obj2.key).split('_')[-1][:-1]
|
|
|
count_bag = 0
|
|
|
for obj3 in oss2.ObjectIterator(bucket, prefix=str(obj2.key)):
|