ashb commented on a change in pull request #6461: [AIRFLOW-5804] Batch the xcom 
pull operation
URL: https://github.com/apache/airflow/pull/6461#discussion_r340583078
 
 

 ##########
 File path: airflow/models/xcom.py
 ##########
 @@ -124,85 +122,71 @@ def set(
 
     @classmethod
     @provide_session
-    def get_one(cls,
-                execution_date,
-                key=None,
-                task_id=None,
-                dag_id=None,
-                include_prior_dates=False,
-                session=None):
+    def compose_query(cls,
 
 Review comment:
   I think you could leave this called `get_many` -- although we used to do this
   
   ```
           results = query.all()
           return results
   ```
   
   The `.all()` call is optional, and SQLAlchemy will correctly and happily 
allow you to iterate over a query.
   
   ```
       @classmethod
       def get_many(...):
           return query
   ```
   
   And then you could use it either like `for xcom in XCom.get_many(...):` or 
`XCom.get_many().filter(extra='condition')`

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


With regards,
Apache Git Services

Reply via email to