feat/flask: !fix strange code to previous
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user