Skip to content

Commit

Permalink
Uncomment os.remove line
Browse files Browse the repository at this point in the history
  • Loading branch information
bhilbert4 committed Jan 30, 2024
1 parent 010d89e commit c2f3055
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions jwql/website/apps/jwql/clean_old_log_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,8 @@ def run(time_limit=timedelta(days=14)):
last_modified_time = datetime.fromtimestamp(stat_result.st_mtime)
age = now - last_modified_time
if age > time_limit:
#os.remove(item.name)
full_path = os.path.join(log_dir, logtype, item)
print(f'DELETING {full_path}')
print('Once initial testing is complete, replace the print statement above with the os.remove line above it.')
os.remove(full_path)


if __name__ == '__main__':
Expand Down

0 comments on commit c2f3055

Please sign in to comment.