From f477155de542168b4992e6bb43eb696b74f669ad Mon Sep 17 00:00:00 2001 From: lb584 <lb584@cam.ac.uk> Date: Wed, 19 Jun 2024 12:57:36 +0100 Subject: [PATCH] rempoving project_handler from logging - not useful as multiple runs all compete and become collated with one another --- ews/coordinator/utils/processor_utils.py | 7 ------- .../coordinator/template_sys_config_EastAfrica.json | 8 ++++---- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/ews/coordinator/utils/processor_utils.py b/ews/coordinator/utils/processor_utils.py index d7d6fce..7ea9811 100644 --- a/ews/coordinator/utils/processor_utils.py +++ b/ews/coordinator/utils/processor_utils.py @@ -389,13 +389,6 @@ def setup_logging(job_file_path: str, log_config_dict['handlers']['handler_job']['filename'] = job_file_path - # if there is no value set for the central project logger in the json file, set a default path. - if not log_config_dict['handlers']['handler_project']['filename']: - # todo how does this work when there are several processors running at once, i.o. errors? - log_path_project = os.path.join(Path.home(), "ews_project_log.txt") - print(f"'HANDLER_PROJECT' HAS NO 'FILENAME' SET TO SETTING TO {log_path_project}") - log_config_dict['handlers']['handler_project']['filename'] = log_path_project - if is_live: # TODO: smtp handler can only use tls, but ssl is more secure. Look into defining/writing a suitable smtp handler log_config_dict['handlers']['handler_buffered_email']['server'] = (gmail_config['host'], gmail_config['port']) diff --git a/pipeline_resources/configs/coordinator/template_sys_config_EastAfrica.json b/pipeline_resources/configs/coordinator/template_sys_config_EastAfrica.json index dd41b68..d6e0dda 100644 --- a/pipeline_resources/configs/coordinator/template_sys_config_EastAfrica.json +++ b/pipeline_resources/configs/coordinator/template_sys_config_EastAfrica.json @@ -5,10 +5,10 @@ "StartString" : "?", "ProjectRoot" : "<path to project root>", "MetoFTP" : "<path to MetoFTP>", - "WorkspacePathout" : "${ProjectRoot}/regions/EastAfrica/workspace/", - "WorkspacePath" : "${ProjectRoot}/regions/EastAfrica/workspace/", - "ConfigsPath" : "${ProjectRoot}/code/coordinator/pipeline_resources/configs/coordinator/pipeline_resources/configs/", + "WorkspacePathout" : "${ProjectRoot}/regions/EastAfrica/workspace", + "WorkspacePath" : "${ProjectRoot}/regions/EastAfrica/workspace", + "ConfigsPath" : "${ProjectRoot}/code/coordinator/pipeline_resources/configs", "AssetsPath" : "${ProjectRoot}/regions/EastAfrica/resources/assets", - "LoggingConfigPath" : "${ConfigsPath}/coordinator/template_log_config.json", + "LoggingConfigPath" : "${ConfigsPath}/coordinator/log_config.json", "PLACES_SHAPE_FILE": "${ProjectRoot}/regions/EastAfrica/resources/assets/plotting/gis_data/common/places_shape/east_africa_places.shp" } -- GitLab