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



##########
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:
       The return value from `double` tasks are pushed into XCom. This is 
similar to
   
   ```python
   @task
   def double(v):
       return v * 2
   
   @task
   def consume(v):
       print(v)
   
   consume(v=double(v=2))
   ```
   
   where `double` would push `4` to XCom.




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