From 2a0a004a1400b292aa65d5a5f5b59a6c6c056dac Mon Sep 17 00:00:00 2001 From: Akshay Dahiya Date: Tue, 1 Oct 2024 16:12:37 +0530 Subject: [PATCH] chore: caching _gen_projects_to_wait_for --- snapshotter/processor_distributor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/snapshotter/processor_distributor.py b/snapshotter/processor_distributor.py index 9659bd0..0504808 100644 --- a/snapshotter/processor_distributor.py +++ b/snapshotter/processor_distributor.py @@ -6,6 +6,7 @@ import sys import time from collections import defaultdict +from functools import lru_cache from functools import partial from signal import SIGINT from signal import signal @@ -721,6 +722,7 @@ def _fetch_base_project_list(self, project_type: str) -> List[str]: base_project_type = self._aggregator_config_mapping[project_type].base_project_type return self._fetch_base_project_list(base_project_type) + @lru_cache(maxsize=None) def _gen_projects_to_wait_for(self, project_type: str) -> List[str]: """ Generates the projects to wait for based on the project type.