From 1bc18728935f2cebed38ae64ffe9f4e2f1d8e539 Mon Sep 17 00:00:00 2001 From: wolflu05 <76838159+wolflu05@users.noreply.github.com> Date: Wed, 12 Jul 2023 15:15:01 +0000 Subject: [PATCH] Test without --- InvenTree/InvenTree/ready.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/InvenTree/InvenTree/ready.py b/InvenTree/InvenTree/ready.py index 0847f3d0e0..c4e7ad0e44 100644 --- a/InvenTree/InvenTree/ready.py +++ b/InvenTree/InvenTree/ready.py @@ -1,6 +1,6 @@ """Functions to check if certain parts of InvenTree are ready.""" -import os +# import os import sys @@ -25,10 +25,11 @@ def isInMainThread(): - The RUN_MAIN env is set in that case. However if --noreload is applied, this variable is not set because there are no different threads. """ - if "runserver" in sys.argv and "--noreload" not in sys.argv: - return os.environ.get('RUN_MAIN', None) == "true" - return True + # if "runserver" in sys.argv and "--noreload" not in sys.argv: + # return os.environ.get('RUN_MAIN', None) == "true" + + # return True def canAppAccessDatabase(allow_test: bool = False, allow_plugins: bool = False, allow_shell: bool = False): @@ -87,6 +88,7 @@ def isPluginRegistryLoaded(): Returns: 'False' if the apps have not been reloaded already to prevent running the ready function twice """ - from plugin import registry + return True + # from plugin import registry - return registry.is_loading + # return registry.is_loading