turbaszek commented on a change in pull request #9616:
URL: https://github.com/apache/airflow/pull/9616#discussion_r453227379
##########
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:
Hm, but if user will provide `session=None` then `session.query(Model)`
will raise an error, right?
----------------------------------------------------------------
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]