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/08/24 17:18:34 UTC

[GitHub] [airflow] dstandish commented on a diff in pull request #25943: Make dataset_event_manager a cached property on TaskInstance

dstandish commented on code in PR #25943:
URL: https://github.com/apache/airflow/pull/25943#discussion_r954072188


##########
airflow/models/taskinstance.py:
##########
@@ -584,8 +584,12 @@ def __init__(
         # can be changed when calling 'run'
         self.test_mode = False
 
-        self.dataset_event_manager = conf.getimport(
-            'core', 'dataset_event_manager_class', fallback='airflow.datasets.manager.DatasetEventManager'
+    @cached_property
+    def dataset_event_manager(self):
+        return conf.getimport(
+            section='core',
+            key='dataset_event_manager_class',
+            fallback='airflow.datasets.manager.DatasetEventManager',
         )()

Review Comment:
   i'm actually working on centralizing this logic... it won't just be used on on TIs @uranusjr @blag 



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