From 5067d69663527c508024c2544d38f58616497f6e Mon Sep 17 00:00:00 2001 From: Levente Bajczi Date: Sat, 23 Nov 2024 23:40:52 +0100 Subject: [PATCH] added cache to func --- contrib/slurm/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/slurm/utils.py b/contrib/slurm/utils.py index b0ed8a124..364c6cb0c 100644 --- a/contrib/slurm/utils.py +++ b/contrib/slurm/utils.py @@ -6,7 +6,7 @@ # SPDX-FileCopyrightText: Budapest University of Technology and Economics # # SPDX-License-Identifier: Apache-2.0 - +import functools import json import logging import subprocess @@ -28,6 +28,7 @@ class Config(): executable = tool.executable(locator) print(tool.version(executable))""" + @functools.lru_cache() def version_from_tool_in_container(executable): try: with open(".get_version.py", "w") as script: