feat/flask: !fix strange code to previous

This commit is contained in:
2025-12-25 11:08:15 +02:00
parent c05ac687e0
commit 74f5b71fb6
2 changed files with 10 additions and 10 deletions
+5 -5
View File
@@ -79,11 +79,11 @@ def _updater_loop():
def ensure_started():
global _started
if not _started:
with _updater_lock:
if not _started:
_started = True
threading.Thread(target=_updater_loop, daemon=True).start()
with _updater_lock:
if _started:
return
threading.Thread(target=_updater_loop, daemon=True).start()
_started = True
_refresh_build_date_once()
+5 -5
View File
@@ -44,8 +44,8 @@ def load_all_locales():
def ensure_loaded():
global translations, locales_name, locales_code, _loaded
if not _loaded:
with _load_lock:
if not _loaded:
translations, locales_name, locales_code = load_all_locales()
_loaded = True
with _load_lock:
if _loaded:
return
translations, locales_name, locales_code = load_all_locales()
_loaded = True