From 7c7906046766d0f898a880725aab3f631ce24d96 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 26 Aug 2024 20:52:21 +0200 Subject: [PATCH] perf: hmmm try to fix race condition in previous cache system ? --- src/app.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app.py b/src/app.py index 479921427..6abe37db2 100644 --- a/src/app.py +++ b/src/app.py @@ -2020,7 +2020,6 @@ ynh_app_config_run $1 ret = super()._get_config_panel() - app = self.entity settings = _get_app_settings(self.entity) 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: 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): "Get app manifest stored in json or in toml"