jonathanshir commented on a change in pull request #8651:
URL: https://github.com/apache/airflow/pull/8651#discussion_r421371079
##########
File path: airflow/config_templates/config.yml
##########
@@ -366,6 +366,17 @@
type: string
example: "path.to.CustomXCom"
default: "airflow.models.xcom.BaseXCom"
+ - name: additional_execute_contextmanager
+ description: |
+ Custom user function that returns a context manager. Syntax is
"package.method".
+ Context is entered when operator starts executing task. __enter__()
will be called
+ before the operator's execute method, and __exit__() shortly after.
+ Function's signature should accept two positional parameters - task
instance
+ and execution context
Review comment:
I'm not sure that clears things up -- personally it took me a few
minutes to understand myself how this is equivalent.
I think the simplistic explanation is more understandable than the code
example.
----------------------------------------------------------------
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]