Skip to content

Commit be28a93

Browse files
committed
Use DataScienceJobRun to get the lifecycle states.
1 parent af6645a commit be28a93

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ads/jobs/builders/infrastructure/dsc_job.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -868,9 +868,9 @@ def download(self, to_dir):
868868

869869
def delete(self, force_delete: bool = False):
870870
if force_delete and self.status in [
871-
oci.data_science.models.JobRun.LIFECYCLE_STATE_ACCEPTED,
872-
oci.data_science.models.JobRun.LIFECYCLE_STATE_IN_PROGRESS,
873-
oci.data_science.models.JobRun.LIFECYCLE_STATE_NEEDS_ATTENTION,
871+
DataScienceJobRun.LIFECYCLE_STATE_ACCEPTED,
872+
DataScienceJobRun.LIFECYCLE_STATE_IN_PROGRESS,
873+
DataScienceJobRun.LIFECYCLE_STATE_NEEDS_ATTENTION,
874874
]:
875875
self.cancel(wait_for_completion=True)
876876
super().delete()

0 commit comments

Comments
 (0)