From dd517b036d14a4e5d78c1fbde97f1760bf848004 Mon Sep 17 00:00:00 2001 From: Eric Biagiotti Date: Thu, 17 Jan 2019 10:02:43 -0500 Subject: [PATCH 1/1] 13306: Prevents multiple RunTimeStatusLoggingHandlers from being added Arvados-DCO-1.1-Signed-off-by: Eric Biagiotti --- sdk/cwl/arvados_cwl/executor.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sdk/cwl/arvados_cwl/executor.py b/sdk/cwl/arvados_cwl/executor.py index 60ea2ce824..e5a3d59858 100644 --- a/sdk/cwl/arvados_cwl/executor.py +++ b/sdk/cwl/arvados_cwl/executor.py @@ -185,6 +185,11 @@ http://doc.arvados.org/install/install-api-server.html#disable_api_methods # if running inside a container if arvados_cwl.util.get_current_container(self.api, self.num_retries, logger): root_logger = logging.getLogger('') + + # Remove existing RuntimeStatusLoggingHandlers if they exist + handlers = [h for h in root_logger.handlers if not isinstance(h, RuntimeStatusLoggingHandler)] + root_logger.handlers = handlers + handler = RuntimeStatusLoggingHandler(self.runtime_status_update) root_logger.addHandler(handler) -- 2.30.2