airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] KevinYang21 commented on a change in pull request #4253: [AIRFLOW-3414] Fix reload_module in DagFileProcessorAgent
Date Sun, 02 Dec 2018 00:50:50 GMT
KevinYang21 commented on a change in pull request #4253: [AIRFLOW-3414] Fix reload_module in
DagFileProcessorAgent
URL: https://github.com/apache/incubator-airflow/pull/4253#discussion_r238081263
 
 

 ##########
 File path: airflow/utils/dag_processing.py
 ##########
 @@ -539,7 +541,9 @@ def helper():
             # e.g. RotatingFileHandler. And it can cause connection corruption if we
             # do not recreate the SQLA connection pool.
             os.environ['CONFIG_PROCESSOR_MANAGER_LOGGER'] = 'True'
-            reload_module(airflow.config_templates.airflow_local_settings)
+            # Replicating the behavior of how logging module was loaded
+            # in logging_config.py
+            reload_module(import_module(logging_class_path.rsplit('.', 1)[0]))
 
 Review comment:
   It will actually [return a list as split](https://docs.python.org/2/library/string.html#string.rsplit).
If not it will fail the newly added unit test :D

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

Mime
View raw message