You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/05/03 16:39:23 UTC

[GitHub] [airflow] mik-laj commented on a change in pull request #8651: [AIP-31] [AIRFLOW-8058] Retrieve current execution context without altering function's signature

mik-laj commented on a change in pull request #8651:
URL: https://github.com/apache/airflow/pull/8651#discussion_r419128100



##########
File path: airflow/models/taskinstance.py
##########
@@ -1110,6 +1116,27 @@ def signal_handler(signum, frame):
             session.merge(self)
         session.commit()
 
+    def get_user_defined_execute_context(self, execution_context):
+        """
+        Retrieves the user defined execution context callback from the configuration,
+        and validates that it is indeed a context manager
+        :param execution_context: the current execution context to be passed to user ctx
+        """
+        path_to_user_context = conf.get("core", "user_defined_execute_context")

Review comment:
       This condition is not needed. getimport returns None when the option value is empty. 




----------------------------------------------------------------
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:
users@infra.apache.org