|
@@ -113,15 +113,6 @@ def is_upload_completed(bucket, prefix):
|
|
|
return int(count) == int(target_number)
|
|
|
|
|
|
|
|
|
-'''
|
|
|
-cname:http://open-bucket.oss.icvdc.com
|
|
|
-keyid:n8glvFGS25MrLY7j
|
|
|
-secret:xZ2Fozoarpfw0z28FUhtg8cu0yDc5d
|
|
|
-oss桶名: oss://open-bucket
|
|
|
-
|
|
|
-oss桶名: open-bucket
|
|
|
-内网endpoint: oss-cn-beijing-gqzl-d01-a.ops.gqzl-cloud.com
|
|
|
-'''
|
|
|
# ------- 获取合并之后的bag包,解析出csv -------
|
|
|
if __name__ == '__main__':
|
|
|
# 1 创建阿里云对象
|
|
@@ -131,7 +122,6 @@ if __name__ == '__main__':
|
|
|
while True:
|
|
|
try:
|
|
|
logging.info("开始新一轮扫描")
|
|
|
- local_delete_list = []
|
|
|
oss_delete_list = []
|
|
|
prefix_list = []
|
|
|
# 2 获取已经上传完成的所有目录并分组
|
|
@@ -165,18 +155,10 @@ if __name__ == '__main__':
|
|
|
if not os.path.exists(root_path1):
|
|
|
os.makedirs(root_path1)
|
|
|
bucket.get_object_to_file(parse_prefix_full + xoscName, root_path1 + 'scenario_orig.xosc')
|
|
|
- local_delete_list.append(root_path1 + 'scenario_orig.xosc')
|
|
|
move_xosc_before_simulation(root_path1)
|
|
|
simulation(parse_prefix_full, root_path1 + 'simulation.mp4')
|
|
|
except Exception as e:
|
|
|
logging.exception("局部异常处理: %s", str(e))
|
|
|
- # 删除本地临时文件
|
|
|
- if len(local_delete_list) > 0:
|
|
|
- for local_delete in local_delete_list:
|
|
|
- try:
|
|
|
- os.remove(local_delete)
|
|
|
- except Exception as e:
|
|
|
- pass
|
|
|
time.sleep(sleep_time)
|
|
|
except Exception as e:
|
|
|
logging.exception("全局异常处理: %s", str(e))
|