File tree Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -48,10 +48,5 @@ def run(self) -> None:
48
48
# Delete run dirs until we encounter the first of the N successful runs to keep.
49
49
oldest_successful_run_index = run_dir_paths .index (successful_run_dir_paths [- MIN_SUCCESSFUL_RUNS ])
50
50
for run_dir_path in run_dir_paths [:oldest_successful_run_index ]:
51
- # NB: our existing GCSorLocalTarget does not work here because
52
- # the LocalTarget API does not support removing directories.
53
- if run_dir_path .startswith ('gs://' ):
54
- gcs .GCSTarget (pathname ).remove (recursive = True )
55
- else :
56
- shutil .rmtree (run_dir_path )
51
+ GCSorLocalTarget (run_dir_path .replace ('file:' , '' )).remove ()
57
52
self ._complete = True
Original file line number Diff line number Diff line change @@ -103,10 +103,12 @@ def test_leave_incomplete_runs(self) -> None:
103
103
)
104
104
self .assertFalse (
105
105
hl .hadoop_exists (
106
- runs_path (
107
- ReferenceGenome .GRCh38 ,
108
- DatasetType .SNV_INDEL ,
109
- ),
110
- 'manual__2024-01-05'
106
+ os .path .join (
107
+ runs_path (
108
+ ReferenceGenome .GRCh38 ,
109
+ DatasetType .SNV_INDEL ,
110
+ ),
111
+ 'manual__2024-01-05' ,
112
+ )
111
113
)
112
114
)
You can’t perform that action at this time.
0 commit comments