12345678910111213 |
- from configs.logging import logger
- import os
- from app.common.minio import minio_client
- def get_kerberos_to_local(uri: str):
- file_name = uri.split("/")[-1]
- f_exists = os.path.exists('./configs/'+file_name)
- if not f_exists:
- res = minio_client.get_file(uri)
- with open('./configs/'+file_name,'wb') as f:
- f.write(res)
- logger.info(f'{file_name}不存在, 已通过minio下载至本地')
|