perf: hmmm try to fix race condition in previous cache system ?

This commit is contained in:
Alexandre Aubin 2024-08-26 20:52:21 +02:00
parent 007c13ce42
commit 7c79060467

View file

@ -2020,7 +2020,6 @@ ynh_app_config_run $1
ret = super()._get_config_panel() ret = super()._get_config_panel()
app = self.entity
settings = _get_app_settings(self.entity) settings = _get_app_settings(self.entity)
for _, _, option in self._iterate(): for _, _, option in self._iterate():
@ -2115,6 +2114,11 @@ def _set_app_settings(app, settings):
with open(os.path.join(APPS_SETTING_PATH, app, "settings.yml"), "w") as f: with open(os.path.join(APPS_SETTING_PATH, app, "settings.yml"), "w") as f:
yaml.safe_dump(settings, f, default_flow_style=False) yaml.safe_dump(settings, f, default_flow_style=False)
if app in app_settings_cache_timestamp:
del app_settings_cache_timestamp[app]
if app in app_settings_cache:
del app_settings_cache[app]
def _get_manifest_of_app(path): def _get_manifest_of_app(path):
"Get app manifest stored in json or in toml" "Get app manifest stored in json or in toml"