potiuk commented on code in PR #30255:
URL: https://github.com/apache/airflow/pull/30255#discussion_r1161531609
##########
airflow/dag_processing/manager.py:
##########
@@ -576,8 +585,11 @@ def _run_parsing_loop(self):
while True:
loop_start_time = time.monotonic()
ready = multiprocessing.connection.wait(self.waitables.keys(),
timeout=poll_time)
- if self._job:
- self._job.heartbeat()
+ # we cannot (for now) define job in _job_runner nicely due to
circular references of
+ # job and job runner, so we have to use getattr, but we might
address it in the future
+ # change when decoupling these two even more
+ if getattr(self._job_runner, "job", None) is not None:
+ perform_heartbeat(self._job_runner.job,
only_if_necessary=False)
Review Comment:
I think we will not need it at the end -> when we complet the refactoring
(final state is #30376), this line is gone, we have job defined individually in
each *JobRunner and we always know which runner we access, so there is no need
to add the typeguard I think
--
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]