From a466ca89cf8b99acb0be07e2d1d088494a508fe8 Mon Sep 17 00:00:00 2001 From: Jan Polonsky Date: Mon, 4 Nov 2024 10:45:07 +0100 Subject: [PATCH] Remove redundant code --- src/collectors/collectors/email_collector.py | 2 -- src/collectors/managers/collectors_manager.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/collectors/collectors/email_collector.py b/src/collectors/collectors/email_collector.py index 5cda7f11..a323f69d 100644 --- a/src/collectors/collectors/email_collector.py +++ b/src/collectors/collectors/email_collector.py @@ -49,8 +49,6 @@ def collect(self, source): Parameters: source -- Source object. """ - BaseCollector.update_last_attempt(source) - self.collector_source = f"{self.name} '{source.name}':" news_items = [] email_server_type = source.parameter_values["EMAIL_SERVER_TYPE"] email_server_hostname = source.parameter_values["EMAIL_SERVER_HOSTNAME"] diff --git a/src/collectors/managers/collectors_manager.py b/src/collectors/managers/collectors_manager.py index 565edd9f..998c22a1 100644 --- a/src/collectors/managers/collectors_manager.py +++ b/src/collectors/managers/collectors_manager.py @@ -37,7 +37,7 @@ def reportStatus(): def initialize(): """Initialize the collectors.""" - logger.info(f"{__name__}: Initializing collector...") + logger.info(f"Initializing collector...") # inform core that this collector node is alive status_report_thread = threading.Thread(target=reportStatus) @@ -53,7 +53,7 @@ def initialize(): register_collector(ManualCollector()) register_collector(ScheduledTasksCollector()) - logger.info(f"{__name__}: Collector initialized.") + logger.info(f"Collector initialized.") def register_collector(collector):