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 2022/03/04 12:57:48 UTC

[GitHub] [airflow] malthe commented on a change in pull request #21993: Change the storage of frame to use threadLocal rather than Dict

malthe commented on a change in pull request #21993:
URL: https://github.com/apache/airflow/pull/21993#discussion_r819548088



##########
File path: airflow/models/taskinstance.py
##########
@@ -1746,7 +1745,8 @@ def handle_failure(
 
         if error:
             if isinstance(error, BaseException):
-                execution_frame = _EXECUTION_FRAME_MAPPING.get(self.task)
+                execution_frame = _LAST_FRAME_LOCAL_STORAGE.frame
+                _LAST_FRAME_LOCAL_STORAGE.frame = None

Review comment:
       I think `del` is nicer because then it will fail if there is a logical error in the code.




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org