代码拉取完成,页面将自动刷新
#!/usr/bin/env
import fun
import time
import config
from oss.oss_util import *
# need delete filename prefix
oss_file_pre="mongodb_cycle_backup_test_titan_"
# not delete file dir
un_delete_file_dir=["mongodb_cycle_backup_test_titan_20151123152558"]
def check_in_array():
if "healing potion" in inventory:
print "You will live to fight another day."
if __name__ == "__main__":
start_time = time.time()
oss=fun.get_oss_connect(config.endpoint, config.accessKeyId, config.accessKeySecret);
file_list_on_oss=fun.list_bucket_files(oss,config.bucket,oss_file_pre)
for each in file_list_on_oss:
file_name=each[0];
file_dir_name=file_name.split("/")[0]
print(file_dir_name)
if file_dir_name not in un_delete_file_dir:
fun.del_bucket_file(oss,config.bucket,file_name)
print("del "+file_name)
fun.print_cost_time("all done ", start_time)
fun.list_bucket_files(oss,config.bucket)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。