mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-12 01:55:39 +00:00
Test without
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user