2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-12 01:55:39 +00:00

Test without

This commit is contained in:
wolflu05
2023-07-12 15:15:01 +00:00
parent a43a72d0f4
commit 1bc1872893

View File

@ -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