Skip to content

Commit

Permalink
added cache to func
Browse files Browse the repository at this point in the history
  • Loading branch information
leventeBajczi committed Nov 23, 2024
1 parent 65c9a19 commit 5067d69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contrib/slurm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# SPDX-FileCopyrightText: Budapest University of Technology and Economics <https://www.ftsrg.mit.bme.hu>
#
# SPDX-License-Identifier: Apache-2.0

import functools
import json
import logging
import subprocess
Expand All @@ -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:
Expand Down

0 comments on commit 5067d69

Please sign in to comment.