Skip to content

Commit 8ccb442

Browse files
committed
remove folder creation logic from thread to resprect optional downloa'; similarly download shutdown depend on optional download
1 parent 0e7c4f5 commit 8ccb442

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

openeo/extra/job_management/_manager.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,8 +536,11 @@ def run_jobs(
536536
stats["sleep"] += 1
537537

538538

539-
self._worker_pool.shutdown()
540-
self._download_pool.shutdown()
539+
if self._worker_pool is not None:
540+
self._worker_pool.shutdown()
541+
542+
if self._download_pool is not None:
543+
self._download_pool.shutdown()
541544

542545
return stats
543546

openeo/extra/job_management/_thread_worker.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,6 @@ def execute(self) -> _TaskResult:
157157
try:
158158
job = self.get_connection(retry=True).job(self.job_id)
159159

160-
# Ensure download directory exists
161-
self.download_dir.mkdir(parents=True, exist_ok=True)
162-
163160
# Download results
164161
job.get_results().download_files(target=self.download_dir)
165162

0 commit comments

Comments
 (0)