dstandish commented on a change in pull request #22583:
URL: https://github.com/apache/airflow/pull/22583#discussion_r839219281



##########
File path: airflow/models/taskinstance.py
##########
@@ -2339,7 +2350,15 @@ def xcom_pull(
                 .order_by(None)
                 .order_by(XCom.map_index.asc())
             )
-            return (XCom.deserialize_value(r) for r in query)
+
+            def iter_xcom_values(query):
+                # The session passed to xcom_pull() may die before this is
+                # iterated through, so we need to bind to a new session.
+                with create_session() as session:

Review comment:
       I'll take your word for it.  But that example seems quite odd... because 
xcom_pull isn't actually going to be invoked in what you've written, because no 
tasks have been run, so there's nothing to pull ...




-- 
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]


Reply via email to