Skip to content

Commit

Permalink
[runpod] Fix RunContainerError condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Mezentsev authored and TheBits committed Apr 15, 2024
1 parent c9b4412 commit 1637d09
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,10 @@ async def _process_submitted_job(session: AsyncSession, job_model: JobModel):
if isinstance(e, ContainerTimeoutError)
else JobTerminationReason.CONTAINER_EXITED_WITH_ERROR
)
logger.debug("%s: provisioning failed, error: %s", fmt(job_model), e)
logger.debug("%s: provisioning failed: %s", fmt(job_model), e)
job_model.status = JobStatus.TERMINATING
job_model.termination_reason = reason
job_model.termination_reason_message = str(e)
job_model.last_processed_at = common_utils.get_current_datetime()
await session.commit()
return
Expand Down Expand Up @@ -290,7 +291,7 @@ async def _run_job_on_new_instance(
project_ssh_public_key,
project_ssh_private_key,
)
except (ContainerTimeoutError, ContainerTimeoutError):
except (ContainerTimeoutError, RunContainerError):
raise
except BackendError as e:
logger.warning(
Expand Down

0 comments on commit 1637d09

Please sign in to comment.