rawwar commented on code in PR #39295:
URL: https://github.com/apache/airflow/pull/39295#discussion_r1590622588
##########
airflow/providers/databricks/operators/databricks.py:
##########
@@ -1041,7 +1044,21 @@ def monitor_databricks_job(self) -> None:
run = self._hook.get_run(self.databricks_run_id)
run_state = RunState(**run["state"])
self.log.info("Current state of the job: %s",
run_state.life_cycle_state)
+
while not run_state.is_terminal:
+ if self.deferrable:
Review Comment:
I will refactor this.
But, the reason for doing this is if the Databricks job exited even before
we deferred it, I thought this would be optimal. Although, I agree that this is
a rare case scenario and better to refactor
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]