|
|
|
@ -26,17 +26,16 @@ def start_unzip_task(): |
|
|
|
|
# 从数据库中获取数据 |
|
|
|
|
data = db_obj.get_data_by_id(folder) |
|
|
|
|
|
|
|
|
|
if data: |
|
|
|
|
if data and all_file['handle_zip']: |
|
|
|
|
# 解压, 增加适用历史密码重试的功能 |
|
|
|
|
if all_file['handle_zip']: |
|
|
|
|
if unzip_obj.unzip(all_file['handle_zip'][0], data['unzip_pwd']): |
|
|
|
|
file_obj.del_all_files(all_file['zip']) |
|
|
|
|
else: |
|
|
|
|
for pwd in db_obj.get_available_pwd(): |
|
|
|
|
result = unzip_obj.unzip(all_file['handle_zip'][0], pwd) |
|
|
|
|
if result: |
|
|
|
|
file_obj.del_all_files(all_file['zip']) |
|
|
|
|
break |
|
|
|
|
if unzip_obj.unzip(all_file['handle_zip'][0], data['unzip_pwd']): |
|
|
|
|
file_obj.del_all_files(all_file['zip']) |
|
|
|
|
else: |
|
|
|
|
for pwd in db_obj.get_available_pwd(): |
|
|
|
|
result = unzip_obj.unzip(all_file['handle_zip'][0], pwd) |
|
|
|
|
if result: |
|
|
|
|
file_obj.del_all_files(all_file['zip']) |
|
|
|
|
break |
|
|
|
|
|
|
|
|
|
# 重新获取文件检查解压结果 |
|
|
|
|
all_file = file_obj.get_cate_files(os.path.join(root_path, folder)) # 整理文件返回整理后的结果 |
|
|
|
|