Skip to content

Commit

Permalink
Do not cache prep calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
antarcticrainforest committed Aug 29, 2024
1 parent f885747 commit f309f1e
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/freva_deployment/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
import string
import sys
import time
from base64 import b64decode, b64encode
from base64 import b64encode
from copy import deepcopy
from functools import lru_cache
from getpass import getuser
from pathlib import Path
from socket import gethostbyname, gethostname
Expand All @@ -38,7 +37,6 @@
config_dir,
get_cache_information,
get_passwd,
is_bundeled,
load_config,
)
from .versions import get_steps_from_versions
Expand Down Expand Up @@ -206,7 +204,6 @@ def private_key_file(self) -> str:
"You must give a valid path to a private key file."
) from None

@lru_cache()
def _prep_vault(self) -> None:
"""Prepare the vault."""
self.cfg["vault"]["config"].setdefault("ansible_become_user", "root")
Expand All @@ -227,7 +224,6 @@ def _prep_vault(self) -> None:
"host", self.cfg["db"]["hosts"]
)

@lru_cache()
def _prep_db(self) -> None:
"""prepare the mariadb service."""
self._config_keys.append("db")
Expand Down Expand Up @@ -256,7 +252,6 @@ def _prep_db(self) -> None:
self._prep_vault()
self._prep_web(False)

@lru_cache()
def _prep_data_loader(self, password: Optional[str] = None) -> None:
"""Prepare the data-loader."""
self._prep_freva_rest()
Expand Down Expand Up @@ -373,7 +368,6 @@ def _prep_data_loader(self, password: Optional[str] = None) -> None:
},
}

@lru_cache()
def _prep_freva_rest(self, prep_web=True) -> None:
"""prepare the freva_rest service."""
self._config_keys.append("freva_rest")
Expand Down Expand Up @@ -410,7 +404,6 @@ def _prep_freva_rest(self, prep_web=True) -> None:
if prep_web:
self._prep_web(False)

@lru_cache()
def _prep_core(self) -> None:
"""prepare the core deployment."""
self._config_keys.append("core")
Expand Down Expand Up @@ -575,12 +568,10 @@ def _prep_web(self, ask_pass: bool = True) -> None:
if ask_pass:
self._prep_apache_config()

@lru_cache()
def _prep_apache_config(self):
with open(self.apache_config, "w") as f_obj:
f_obj.write((Path(asset_dir) / "web" / "freva_web.conf").read_text())

@lru_cache()
def _prep_local_debug(self) -> None:
"""Prepare the system for a potential local debug."""
default_ports = {"db": 3306, "freva_rest": 7777}
Expand Down

0 comments on commit f309f1e

Please sign in to comment.