Update debug texts in src/oldRemover.py

main
Jan Beníček 2024-06-22 04:13:26 +00:00
parent a9786ea684
commit b1361d4ab5
1 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ def remove_old_files(today_date: datetime.datetime, keep_days: int, root_path: s
older_date = today_date - datetime.timedelta(days=keep_days)
last_date = today_date - datetime.timedelta(days=keep_days)
print(file_path_creator(date=older_date, default_path=root_path))
print(f"Candidate File: {file_path_creator(date=older_date, default_path=root_path)}")
while older_date > (datetime.datetime.now() - datetime.timedelta(days=10 + keep_days)):
older_date = older_date - datetime.timedelta(days=1)
@ -32,7 +32,7 @@ def remove_old_files(today_date: datetime.datetime, keep_days: int, root_path: s
return
elif os.path.exists(file_path_creator(date=older_date, default_path=root_path)):
os.remove(file_path_creator(date=older_date, default_path=root_path))
print(f"file remover - {file_path_creator(date=older_date, default_path=root_path)}")
print(f"file remover: {file_path_creator(date=older_date, default_path=root_path)}")
last_date = datetime.datetime(year=older_date.year, month=older_date.month, day=older_date.day)