ashb commented on a change in pull request #3873: [Airflow-2760] Decouple DAG 
parsing loop from scheduler loop
URL: https://github.com/apache/incubator-airflow/pull/3873#discussion_r219587604
 
 

 ##########
 File path: airflow/config_templates/airflow_local_settings.py
 ##########
 @@ -172,6 +196,20 @@
 
 REMOTE_LOGGING = conf.get('core', 'remote_logging')
 
+if os.environ.get('CONFIG_PROCESSOR_MANAGER_LOGGER') == 'True':
+    DEFAULT_LOGGING_CONFIG['handlers'] \
+        .update(DEFAULT_DAG_PARSING_LOGGING_CONFIG['handlers'])
+    DEFAULT_LOGGING_CONFIG['loggers'] \
+        .update(DEFAULT_DAG_PARSING_LOGGING_CONFIG['loggers'])
+
+    # Manually create log directory for processor_manager handler as 
RotatingFileHandler
+    # will only create file but not the directory.
+    processor_manager_handler_config = 
DEFAULT_DAG_PARSING_LOGGING_CONFIG['handlers'][
+        'processor_manager']
+    directory = os.path.dirname(processor_manager_handler_config['filename'])
+    if not os.path.exists(directory):
+        mkdirs(directory, 0o777)
 
 Review comment:
   Rather than checking for if the path already exists it's better to try to 
create and catching the FileExists error - we had a race condition else where 
(in the utils.file_handler or something) that was fixed by doing this.
   
   It's less likely to apply here, but better safe than sorry/

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to