pingzh commented on a change in pull request #9616:
URL: https://github.com/apache/airflow/pull/9616#discussion_r452906352
##########
File path: airflow/jobs/local_task_job.py
##########
@@ -135,7 +135,11 @@ def heartbeat_callback(self, session=None):
self.task_runner.terminate()
return
- self.task_instance.refresh_from_db()
+ if session is None:
+ self.task_instance.refresh_from_db()
+ else:
+ self.task_instance.refresh_from_db(session=session)
Review comment:
Great point. I have thought about it. The concern is that if we enforce
it in the `provide_session`, then there is no way to pass in `session=None` to
the function.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]