mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-16 12:05:53 +00:00
* Do not enforce INVENTREE_LOG_LEVEL in dockerfile
- Already defaults to WARNING anyway
- Prevents override in config file
* Enable plugin loading in worker thread
(cherry picked from commit c82713328d
)
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
committed by
GitHub
parent
cdb0f2373c
commit
506139c1cd
@ -23,7 +23,6 @@ ENV PYTHONUNBUFFERED 1
|
|||||||
ENV PIP_DISABLE_PIP_VERSION_CHECK 1
|
ENV PIP_DISABLE_PIP_VERSION_CHECK 1
|
||||||
ENV INVOKE_RUN_SHELL="/bin/ash"
|
ENV INVOKE_RUN_SHELL="/bin/ash"
|
||||||
|
|
||||||
ENV INVENTREE_LOG_LEVEL="WARNING"
|
|
||||||
ENV INVENTREE_DOCKER="true"
|
ENV INVENTREE_DOCKER="true"
|
||||||
|
|
||||||
# InvenTree paths
|
# InvenTree paths
|
||||||
|
@ -10,7 +10,7 @@ from django.apps import AppConfig
|
|||||||
|
|
||||||
from maintenance_mode.core import set_maintenance_mode
|
from maintenance_mode.core import set_maintenance_mode
|
||||||
|
|
||||||
from InvenTree.ready import canAppAccessDatabase, isInMainThread
|
from InvenTree.ready import canAppAccessDatabase, isInMainThread, isInWorkerThread
|
||||||
from plugin import registry
|
from plugin import registry
|
||||||
|
|
||||||
logger = logging.getLogger('inventree')
|
logger = logging.getLogger('inventree')
|
||||||
@ -24,7 +24,8 @@ class PluginAppConfig(AppConfig):
|
|||||||
def ready(self):
|
def ready(self):
|
||||||
"""The ready method is extended to initialize plugins."""
|
"""The ready method is extended to initialize plugins."""
|
||||||
# skip loading if we run in a background thread
|
# skip loading if we run in a background thread
|
||||||
if not isInMainThread():
|
|
||||||
|
if not isInMainThread() and not isInWorkerThread():
|
||||||
return
|
return
|
||||||
|
|
||||||
if not canAppAccessDatabase(
|
if not canAppAccessDatabase(
|
||||||
|
Reference in New Issue
Block a user