Skip to content

Commit

Permalink
Generate effective config banner in loop, uncomment log line
Browse files Browse the repository at this point in the history
  • Loading branch information
psrok1 committed Jan 22, 2025
1 parent 475d31c commit 04b47cc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions karton/system/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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():
Expand Down

0 comments on commit 04b47cc

Please sign in to comment.