Skip to content

Commit

Permalink
not needed code
Browse files Browse the repository at this point in the history
  • Loading branch information
burnout87 committed Oct 10, 2024
1 parent 8f088af commit e8161ff
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cdci_data_analysis/flask_app/dispatcher_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,6 @@ def free_up_space(app):
list_scratch_dir = sorted(glob.glob("scratch_sid_*_jid_*"), key=os.path.getmtime)
list_scratch_dir_to_delete = []

list_lock_files = sorted(glob.glob(".lock_*"), key=os.path.getatime)
list_lock_files_to_delete = set()

for scratch_dir in list_scratch_dir:
scratch_dir_age_days = (current_time_secs - os.path.getmtime(scratch_dir)) / (60 * 60 * 24)
if scratch_dir_age_days >= hard_minimum_folder_age_days:
Expand Down Expand Up @@ -443,6 +440,7 @@ def free_up_space(app):
for d in list_scratch_dir_to_delete:
shutil.rmtree(d)

list_lock_files = sorted(glob.glob(".lock_*"), key=os.path.getatime)
num_lock_files_removed = 0
for l in list_lock_files:
lock_file_job_id = l.split('_')[-1]
Expand Down

0 comments on commit e8161ff

Please sign in to comment.