Skip to content

Commit

Permalink
Merge pull request #18997 from davelopez/fix_cleanup_job_directory
Browse files Browse the repository at this point in the history
Fix job directory not being cleaned up
  • Loading branch information
mvdbeek authored Oct 15, 2024
2 parents c71ecab + f83a6d8 commit fb540bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/galaxy/jobs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2157,7 +2157,9 @@ def cleanup(self, delete_files: bool = True) -> None:
if e.errno != errno.ENOENT:
raise
if delete_files:
self.object_store.delete(self.get_job(), base_dir="job_work", entire_dir=True, obj_dir=True)
self.object_store.delete(
self.get_job(), base_dir="job_work", entire_dir=True, dir_only=True, obj_dir=True
)
except Exception:
log.exception("Unable to cleanup job %d", self.job_id)

Expand Down
3 changes: 3 additions & 0 deletions lib/galaxy/objectstore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ def delete(
obj,
entire_dir: bool = False,
base_dir=None,
dir_only=False,
extra_dir=None,
extra_dir_at_root=False,
alt_name=None,
Expand Down Expand Up @@ -572,6 +573,7 @@ def delete(
obj,
entire_dir: bool = False,
base_dir=None,
dir_only=False,
extra_dir=None,
extra_dir_at_root=False,
alt_name=None,
Expand All @@ -582,6 +584,7 @@ def delete(
obj,
entire_dir=entire_dir,
base_dir=base_dir,
dir_only=dir_only,
extra_dir=extra_dir,
extra_dir_at_root=extra_dir_at_root,
alt_name=alt_name,
Expand Down

0 comments on commit fb540bc

Please sign in to comment.