Skip to content

Commit 75c3797

Browse files
committed
remove try, except
1 parent f889eef commit 75c3797

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

openeo/extra/job_management/__init__.py

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

671671
if elapsed > self._cancel_running_job_after:
672-
try:
673-
_log.info(
674-
f"Cancelling long-running job {job.job_id} (after {elapsed}, running since {job_running_start_time})"
675-
)
676-
job.stop()
677-
except OpenEoApiError as e:
678-
_log.error(f"Failed to cancel long-running job {job.job_id}: {e}")
672+
673+
_log.info(
674+
f"Cancelling long-running job {job.job_id} (after {elapsed}, running since {job_running_start_time})"
675+
)
676+
job.stop()
677+
679678
except Exception as e:
680679
_log.error(f"Unexpected error while handling job {job.job_id}: {e}")
681680

0 commit comments

Comments
 (0)