Skip to content

Commit 855a393

Browse files
committed
fix stop_job_thread
1 parent 8ccb442 commit 855a393

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

openeo/extra/job_management/_manager.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,16 +395,12 @@ def stop_job_thread(self, timeout_seconds: Optional[float] = _UNSET):
395395
if self._worker_pool is not None:
396396
self._worker_pool.shutdown()
397397
self._worker_pool = None
398-
399-
if self._download_pool is not None:
400-
self._download_pool.shutdown()
401-
self._download_pool = None
402398

403399
if self._download_pool is not None:
404400
# Wait for downloads to complete before shutting down
405401
_log.info("Waiting for download tasks to complete before stopping...")
406402
while self._download_pool.num_pending_tasks() > 0:
407-
time.sleep(0.5)
403+
time.sleep(1)
408404
self._download_pool.shutdown()
409405
self._download_pool = None
410406

0 commit comments

Comments
 (0)