turbaszek commented on a change in pull request #9616:
URL: https://github.com/apache/airflow/pull/9616#discussion_r452739494



##########
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:
       Not sure about this one. I think it would be better to validate the 
session in `provide_session` WDYT?




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to