JOB API KEEPS SAYING THE JOB IS RUNNING

Anonymous
Not applicable

I have a library that waits until the job goes in the "TERMINATED" / "SKIPPED" state before continuing. It pools the JOB API.

Unfortunately, I'm experiencing cases where the job is terminated on the GUI but the API still keeps saying "RUNNING".

There is another option to wait until the job goes in not running the state?

jose_gonzalez
Databricks Employee
Databricks Employee

Hi @Alessio Palma​,

Do you have any logs that could help us to narrow down the root cause? Please share any logs you might have.

Prabakar
Databricks Employee
Databricks Employee

@Alessio Palma​ could you please provide the API that you are using? Also share some sample output and logs that would help us with some information.

Anonymous
Not applicable

Sometimes it happens, sometimes it does not. The api is:

/api/2.1/jobs/runs/list

Assuming INTERNAL_ERROR as TERMINATED state seems to be the a good workaround.

This is my solution so far...

if life_cycle_state.upper() not in ("TERMINATED", "SKIPPED", "INTERNAL_ERROR"):

View solution in original post