Skip to content

Commit 2e9b256

Browse files
authored
Ignore cancelled job (#155)
Signed-off-by: khorshuheng <khor.heng@gojek.com> Co-authored-by: khorshuheng <khor.heng@gojek.com>
1 parent 929a7d1 commit 2e9b256

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

python/feast_spark/job_service.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,12 @@ def ensure_stream_ingestion_jobs(client: Client, all_projects: bool):
489489

490490
for job_hash in job_hashes_to_cancel:
491491
job = jobs_by_hash[job_hash]
492-
if job.get_status() != SparkJobStatus.IN_PROGRESS:
492+
job_status = None
493+
try:
494+
job_status = job.get_status()
495+
except JobNotFoundException:
496+
pass
497+
if job_status != SparkJobStatus.IN_PROGRESS:
493498
logger.warning(
494499
f"Can't cancel job with job_hash={job_hash} job_id={job.get_id()} status={job.get_status()}"
495500
)

0 commit comments

Comments
 (0)