Update debug texts in src/oldRemover.py
parent
a9786ea684
commit
b1361d4ab5
|
@ -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)
|
older_date = today_date - datetime.timedelta(days=keep_days)
|
||||||
last_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)):
|
while older_date > (datetime.datetime.now() - datetime.timedelta(days=10 + keep_days)):
|
||||||
older_date = older_date - datetime.timedelta(days=1)
|
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
|
return
|
||||||
elif os.path.exists(file_path_creator(date=older_date, default_path=root_path)):
|
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))
|
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)
|
last_date = datetime.datetime(year=older_date.year, month=older_date.month, day=older_date.day)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue