清除临时图片另外写脚本执行
This commit is contained in:
@@ -26,15 +26,6 @@ if __name__ == '__main__':
|
|||||||
parser.add_argument('--clean', default=False, type=bool, help='是否将识别中的案子改为待识别状态')
|
parser.add_argument('--clean', default=False, type=bool, help='是否将识别中的案子改为待识别状态')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
if args.clean:
|
if args.clean:
|
||||||
# 清除临时图片
|
|
||||||
for root, dirs, files in os.walk(common_util.get_tmp_img_path(''), topdown=False):
|
|
||||||
for name in dirs:
|
|
||||||
folder_path = os.path.join(root, name)
|
|
||||||
try:
|
|
||||||
shutil.rmtree(folder_path)
|
|
||||||
print(f"已删除文件夹: {folder_path}")
|
|
||||||
except Exception as e:
|
|
||||||
print(f"删除文件夹 {folder_path} 时出错: {e}")
|
|
||||||
# 启动时清除仍在识别中的案子
|
# 启动时清除仍在识别中的案子
|
||||||
session = MysqlSession()
|
session = MysqlSession()
|
||||||
update_flag = (update(ZxPhhd).where(ZxPhhd.exsuccess_flag == '2').values(exsuccess_flag='1'))
|
update_flag = (update(ZxPhhd).where(ZxPhhd.exsuccess_flag == '2').values(exsuccess_flag='1'))
|
||||||
|
|||||||
Reference in New Issue
Block a user