From 0a4fe5f8e556e25b92c996dd5b00ebbf31698e80 Mon Sep 17 00:00:00 2001 From: psrok1 Date: Wed, 22 Jan 2025 14:07:27 +0100 Subject: [PATCH] Generate effective config banner in loop, uncomment log line --- karton/system/system.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/karton/system/system.py b/karton/system/system.py index aa3fb23..aec81fe 100644 --- a/karton/system/system.py +++ b/karton/system/system.py @@ -50,6 +50,9 @@ def __init__(self, config: Optional[Config]) -> None: "system", "crash_started_tasks_on_timeout", False ) + self.last_gc_trigger = time.time() + + def _log_config(self): self.log.info( "Effective config:\n" " gc_interval:\t%s\n" @@ -68,8 +71,6 @@ def __init__(self, config: Optional[Config]) -> None: self.crash_started_tasks_on_timeout, ) - self.last_gc_trigger = time.time() - def gc_collect_resources(self) -> None: # Collects unreferenced resources left in object storage karton_bucket = self.backend.default_bucket_name @@ -216,7 +217,7 @@ def gc_collect(self) -> None: def route_task(self, task: Task, binds: List[KartonBind]) -> None: # Performs routing of task - # self.log.info("[%s] Processing task %s", task.root_uid, task.task_uid) + self.log.info("[%s] Processing task %s", task.root_uid, task.task_uid) # store the producer-task relationship in redis for task tracking self.backend.log_identity_output( task.headers.get("origin", "unknown"), task.headers @@ -300,6 +301,7 @@ def process_routing(self) -> None: self.handle_operations(bodies) def loop(self) -> None: + self._log_config() self.log.info("Manager %s started", self.identity) with self.graceful_killer():