From 9487f3a1aa01612ef243bdbaaf4dac79189b136d Mon Sep 17 00:00:00 2001 From: "martynas.karobcikas" Date: Fri, 27 Sep 2024 10:14:41 +0300 Subject: [PATCH] bugfix: model retriever logging initialized at the beginning --- emf/model_retriever/worker.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/emf/model_retriever/worker.py b/emf/model_retriever/worker.py index 9612b9a..2e40cac 100644 --- a/emf/model_retriever/worker.py +++ b/emf/model_retriever/worker.py @@ -1,19 +1,17 @@ import logging -import time -import config -import json -import sys import uuid -from emf.model_retriever.model_retriever import HandlerModelsToMinio, HandlerModelsValidator, HandlerMetadataToElastic -from emf.common.integrations import elastic, opdm, minio_api, edx, rabbit from emf.common.logging import custom_logger -from emf.common.config_parser import parse_app_properties -from emf.common.converters import opdm_metadata_to_json # Initialize custom logger elk_handler = custom_logger.initialize_custom_logger(extra={'worker': 'model-retriever', 'worker_uuid': str(uuid.uuid4())}) logger = logging.getLogger(__name__) +import config +from emf.model_retriever.model_retriever import HandlerModelsToMinio, HandlerModelsValidator, HandlerMetadataToElastic +from emf.common.integrations import elastic, opdm, minio_api, edx, rabbit +from emf.common.config_parser import parse_app_properties +from emf.common.converters import opdm_metadata_to_json + parse_app_properties(caller_globals=globals(), path=config.paths.model_retriever.model_retriever) # RabbitMQ consumer implementation