Skip to content

Commit 8a83398

Browse files
committed
remove try, except
1 parent 6f76268 commit 8a83398

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

openeo/extra/job_management.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -678,13 +678,12 @@ def _cancel_prolonged_job(self, job: BatchJob, row):
678678
elapsed = current_time - job_running_start_time
679679

680680
if elapsed > self._cancel_running_job_after:
681-
try:
682-
_log.info(
683-
f"Cancelling long-running job {job.job_id} (after {elapsed}, running since {job_running_start_time})"
684-
)
685-
job.stop()
686-
except OpenEoApiError as e:
687-
_log.error(f"Failed to cancel long-running job {job.job_id}: {e}")
681+
682+
_log.info(
683+
f"Cancelling long-running job {job.job_id} (after {elapsed}, running since {job_running_start_time})"
684+
)
685+
job.stop()
686+
688687
except Exception as e:
689688
_log.error(f"Unexpected error while handling job {job.job_id}: {e}")
690689

0 commit comments

Comments
 (0)