turbaszek commented on issue #8058:
URL: https://github.com/apache/airflow/issues/8058#issuecomment-619540876


   > We simply have a single execute context for each task instance, so my 
intended implementation will be a bit simpler:
   > 
   > ```
   > from airflow.current import current_context
   > @task
   > def context_task(...)
   >     context = current_context()
   >     return context['run_date']
   > ```
   
   +1 for starting simple, what would you say to make this context a 
namedtuple? Referencing values is much more easier with namedtuple than with 
dictionary (no need to remember names).


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