Skip to content

Commit

Permalink
remove try, except
Browse files Browse the repository at this point in the history
  • Loading branch information
HansVRP committed Jan 8, 2025
1 parent f889eef commit 75c3797
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions openeo/extra/job_management/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,13 +669,12 @@ def _cancel_prolonged_job(self, job: BatchJob, row):
elapsed = current_time - job_running_start_time

if elapsed > self._cancel_running_job_after:
try:
_log.info(
f"Cancelling long-running job {job.job_id} (after {elapsed}, running since {job_running_start_time})"
)
job.stop()
except OpenEoApiError as e:
_log.error(f"Failed to cancel long-running job {job.job_id}: {e}")

_log.info(
f"Cancelling long-running job {job.job_id} (after {elapsed}, running since {job_running_start_time})"
)
job.stop()

except Exception as e:
_log.error(f"Unexpected error while handling job {job.job_id}: {e}")

Expand Down

0 comments on commit 75c3797

Please sign in to comment.