|
|
|
|
@ -87,7 +87,7 @@ def clean_old_files(directory, days=DAYS):
|
|
|
|
|
file_path = os.path.join(root, file)
|
|
|
|
|
if os.path.getmtime(file_path) < cutoff:
|
|
|
|
|
os.remove(file_path)
|
|
|
|
|
log_print(f"Removed old file: {file_path}")
|
|
|
|
|
print(f"Removed old file: {file_path}")
|
|
|
|
|
|
|
|
|
|
# 定期清理任务
|
|
|
|
|
def schedule_cleanup():
|
|
|
|
|
|